Revision: 69054
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 12, 2015 01:40 by johnschneider
Initial Code
<!DOCTYPE html> <?php // set error reporting error_reporting(-1); error_reporting(E_ALL); // start session session_start(); $servername = ""; $username = ""; $password = ""; $dbname = ""; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } else { //echo "Connected successfully"; } // figure out contect of call based on passed in category or product $category = $_REQUEST['category'] ; //$product_id = $_REQUEST['product_id'] ; $product = $_REQUEST['product'] ; if ( $product != '' ) { // this has to change to select * from site_partnerproducts with a join //$query= "SELECT * FROM `site_partnerproducts` AS a, `site_partners` AS b WHERE a.partner_id = b.partner_id AND a.Product = '$product' //ORDER BY b.PartnerCategory ASC, b.logo_sortorder ASC,b.category_sortorder ASC, b.Partner ASC"; $query = "SELECT * FROM `site_partnerproducts` AS a, `site_partners` AS b"; $query .= " WHERE a.partner_id = b.partner_id AND a.Product = '$product'"; $query .= " ORDER BY b.category_sortorder ASC, b.logo_sortorder ASC"; //$query .= " ORDER BY b.PartnerCategory, b.logo_sortorder ASC, b.Partner ASC"; //echo $query; } else { $query = "SELECT * FROM site_partners"; } //echo $query; $result = mysqli_query($conn, $query); if (mysqli_num_rows($result) > 0) { // output data of each row /* while($row = mysqli_fetch_assoc($result)) { echo "<br>".$row["Partner"]."<br>".$row["Description"]."<br>".$row["Logo_Large"]."<br>".$row["Logo_Small"]."<br>".$row["PartnerURL"]."<br>" .$row["partner_id"]."<br>".$row["PartnerCategory"]."<br>"; } */ } else { //echo "<br />0 results"; } ?> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>Partners and Integrations | NRGShip</title> <link rel="shortcut icon" href="img/favicon.png"> <meta name="description" content=""> <script type="text/javascript" src="http://www.nrgsoft.com/new2/js/jquery.min.js"></script> <!-- CSS --> <link href="http://www.nrgsoft.com/new2/css/preload.css" rel="stylesheet" media="screen"> <link href="http://www.nrgsoft.com/new2/css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="http://www.nrgsoft.com/new2/css/yamm.css" rel="stylesheet" media="screen"> <link href="http://www.nrgsoft.com/new2/css/bootstrap-switch.min.css" rel="stylesheet" media="screen"> <link href="http://www.nrgsoft.com/new2/css/font-awesome.min.css" rel="stylesheet" media="screen"> <link href="http://www.nrgsoft.com/new2/css/animate.min.css" rel="stylesheet" media="screen"> <link href="http://www.nrgsoft.com/new2/css/slidebars.css" rel="stylesheet" media="screen"> <link href="http://www.nrgsoft.com/new2/css/lightbox.css" rel="stylesheet" media="screen"> <link href="http://www.nrgsoft.com/new2/css/jquery.bxslider.css" rel="stylesheet"> <link href="http://www.nrgsoft.com/new2/css/syntaxhighlighter/shCore.css" rel="stylesheet" media="screen"> <link href="http://www.nrgsoft.com/new2/css/style-orange.css" rel="stylesheet" media="screen" title="default"> <link href="http://www.nrgsoft.com/new2/css/width-full.css" rel="stylesheet" media="screen" title="default"> <link href="http://www.nrgsoft.com/new2/css/buttons.css" rel="stylesheet" media="screen"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="http://www.nrgsoft.com/new2/js/html5shiv.min.js"></script> <script src="http://www.nrgsoft.com/new2/js/respond.min.js"></script> <![endif]--> </head> <style> </style> <!-- Preloader --> <div id="preloader"> <div id="status"> </div> </div> <body> <div id="sb-site"> <div class="boxed"> <?php include ("http://www.nrgsoft.com/new2/navbar.php"); ?> <header class="main-header"> <div class="container"> <!-- Collect the nav links, forms, and other content for toggling --> <!-- <div class="pull-right"> <a href="javascript:void(0);" class="sb-icon-navbar sb-toggle-right"><i class="fa fa-bars"></i></a> </div> --> <?php if ( $product == 'all') { echo ' <h1 class="page-title">Shipping Partners and Integrations</h1>'; } elseif ($product == 'mac') { echo ' <h1 class="page-title">Mac Partners and Integrations</h1>'; } elseif ($product == 'filemaker') { echo ' <h1 class="page-title">FileMaker Partners and Integrations</h1>'; } elseif ($product == 'nrgship_upsfm') { echo ' <h1 class="page-title">UPS for FileMaker Integrations</h1> <ol class="breadcrumb pull-right"> <li><a href="http://www.nrgsoft.com/new2/shipping/filemaker/ups/ups_filemaker.php">Features</a></li> <li><a href="http://www.nrgsoft.com/new2/shipping/common//partners_integrations.php?product=nrgship_upsfm">Integrations</a></li> <li><a href="#">FAQs</a></li> <li><a href="#">Pricing</a></li> </ol> '; } elseif ($product == 'nrgship_ups') { echo ' <h1 class="page-title">NRGship for UPS Integrations</h1> <ol class="breadcrumb pull-right"> <li><a href="http://www.nrgsoft.com/new2/shipping/mac/ups/nrgship_ups.php">Features</a></li> <li><a href="http://www.nrgsoft.com/new2/shipping/common//partners_integrations.php?product=nrgship_ups">Integrations</a></li> <li><a href="#">FAQs</a></li> <li><a href="#">Pricing</a></li> </ol> '; } elseif ($product == 'nrgship_upspro') { echo ' <h1 class="page-title">NRGship Pro for UPS Integrations</h1> <ol class="breadcrumb pull-right"> <li><a href="http://www.nrgsoft.com/new2/shipping/mac/ups/nrgship_pro_ups.php">Features</a></li> <li><a href="http://www.nrgsoft.com/new2/shipping/common//partners_integrations.php?product=nrgship_upspro">Integrations</a></li> <li><a href="#">FAQs</a></li> <li><a href="#">Pricing</a></li> </ol> '; } elseif ($product == 'nrgship_fedexpro') { echo ' <h1 class="page-title">NRGship Pro for FedEx Integrations</h1> <ol class="breadcrumb pull-right"> <li><a href="http://www.nrgsoft.com/new2/shipping/mac/fedex/nrgship_pro_fedex.php">Features</a></li> <li><a href="http://www.nrgsoft.com/new2/shipping/common//partners_integrations.php?product=nrgship_fedexpro">Integrations</a></li> <li><a href="#">FAQs</a></li> <li><a href="#">Pricing</a></li> </ol> '; } elseif ($product == 'nrgship_fedexfm') { echo ' <h1 class="page-title">FedEx for FileMaker Integrations</h1> <ol class="breadcrumb pull-right"> <li><a href="http://www.nrgsoft.com/new2/shipping/filemaker/fedex/fedex_filemaker.php">Features</a></li> <li><a href="http://www.nrgsoft.com/new2/shipping/common//partners_integrations.php?product=nrgship_fedexfm">Integrations</a></li> <li><a href="#">FAQs</a></li> <li><a href="#">Pricing</a></li> </ol> '; } elseif ($product == 'nrg_shipconnect') { echo ' <h1 class="page-title">NRG Ship Connect Integrations</h1> <ol class="breadcrumb pull-right"> <li><a href="http://www.nrgsoft.com/new2/shipping/filemaker/shipconnect/shipconnect.php">Features</a></li> <li><a href="http://www.nrgsoft.com/new2/shipping/common//partners_integrations.php?product=nrg_shipconnect">Integrations</a></li> <li><a href="#">FAQs</a></li> <li><a href="#">Pricing</a></li> </ol> '; } ?> </div> </header> <div class="container"> <div class="portfolio-topbar hidden-sm hidden-xs"> <div class="row"> <div class="col-md-8"> <!-- <h4>Categories</h4> --> <ul class="portfolio-topbar-cats"> <?php if ($product == 'all') { // below adjust category value to be whatever the value is for the category in db if ($category == '' || $category == 'all' ) { echo ' <li><span class="filter" data-filter="all">All</span></li>'; } if ($category == '' || $category == 'shopping_carts' ) { echo ' <li><span class="filter" data-filter=".shopping_carts">Shopping Carts</span></li>'; } if ($category == '' || $category == 'marketplaces' ) { echo ' <li><span class="filter" data-filter=".marketplaces">Marketplaces</span></li>'; } if ($category == '' || $category == 'mac_software' ) { echo ' <li><span class="filter" data-filter=".mac_software">Mac Software</span></li>'; } if ($category == '' || $category == 'filemaker_solutions' ) { echo ' <li><span class="filter active" data-filter=".filemaker_solutions">FileMaker Solutions</span></li>'; } if ($category == '' || $category == 'shipping_partners' ) { echo ' <li><span class="filter" data-filter=".shipping_partners">Shipping Partners</span></li>'; } } elseif ($product == 'filemaker') { // below adjust category value to be whatever the value is for the category in db if ($category == '' || $category == 'all' ) { echo ' <li><span class="filter" data-filter="all">All</span></li>'; } if ($category == '' || $category == 'shopping_carts' ) { echo ' <li><span class="filter" data-filter=".shopping_carts">Shopping Carts</span></li>'; } if ($category == '' || $category == 'marketplaces' ) { echo ' <li><span class="filter" data-filter=".marketplaces">Marketplaces</span></li>'; } if ($category == '' || $category == 'mac_software' ) { echo ' <li><span class="filter" data-filter=".mac_software">Mac Software</span></li>'; } if ($category == '' || $category == 'filemaker_solutions' ) { echo ' <li><span class="filter active" data-filter=".filemaker_solutions">FileMaker Solutions</span></li>'; } if ($category == '' || $category == 'shipping_partners' ) { echo ' <li><span class="filter" data-filter=".shipping_partners">Shipping Partners</span></li>'; } } elseif ($product == 'mac') { // below adjust category value to be whatever the value is for the category in db if ($category == '' || $category == 'all' ) { echo ' <li><span class="filter" data-filter="all">All</span></li>'; } if ($category == '' || $category == 'shopping_carts' ) { echo ' <li><span class="filter" data-filter=".shopping_carts">Shopping Carts</span></li>'; } if ($category == '' || $category == 'marketplaces' ) { echo ' <li><span class="filter" data-filter=".marketplaces">Marketplaces</span></li>'; } if ($category == '' || $category == 'mac_software' ) { echo ' <li><span class="filter" data-filter=".mac_software">Mac Software</span></li>'; } } elseif ($product == 'nrgship_fedexfm') { // below adjust category value to be whatever the value is for the category in db if ($category == '' || $category == 'all' ) { echo ' <li><span class="filter" data-filter="all">All</span></li>'; } if ($category == '' || $category == 'shopping_carts' ) { echo ' <li><span class="filter" data-filter=".shopping_carts">Shopping Carts</span></li>'; } if ($category == '' || $category == 'marketplaces' ) { echo ' <li><span class="filter" data-filter=".marketplaces">Marketplaces</span></li>'; } if ($category == '' || $category == 'mac_software' ) { echo ' <li><span class="filter" data-filter=".mac_software">Mac Software</span></li>'; } } elseif ($product == 'nrg_shipconnect') { // below adjust category value to be whatever the value is for the category in db if ($category == '' || $category == 'all' ) { echo ' <li><span class="filter" data-filter="all">All</span></li>'; } if ($category == '' || $category == 'shopping_carts' ) { echo ' <li><span class="filter" data-filter=".shopping_carts">Shopping Carts</span></li>'; } if ($category == '' || $category == 'marketplaces' ) { echo ' <li><span class="filter" data-filter=".marketplaces">Marketplaces</span></li>'; } if ($category == '' || $category == 'mac_software' ) { echo ' <li><span class="filter" data-filter=".mac_software">Mac Software</span></li>'; } if ($category == '' || $category == 'filemaker_solutions' ) { echo ' <li><span class="filter active" data-filter=".filemaker_solutions">FileMaker Solutions</span></li>'; } if ($category == '' || $category == 'shipping_partners' ) { echo ' <li><span class="filter" data-filter=".shipping_partners">Shipping Partners</span></li>'; } } elseif ($product == 'nrgship_upsfm') { // below adjust category value to be whatever the value is for the category in db if ($category == '' || $category == 'all' ) { echo ' <li><span class="filter" data-filter="all">All</span></li>'; } if ($category == '' || $category == 'shopping_carts' ) { echo ' <li><span class="filter" data-filter=".shopping_carts">Shopping Carts</span></li>'; } if ($category == '' || $category == 'marketplaces' ) { echo ' <li><span class="filter" data-filter=".marketplaces">Marketplaces</span></li>'; } if ($category == '' || $category == 'mac_software' ) { echo ' <li><span class="filter" data-filter=".mac_software">Mac Software</span></li>'; } if ($category == '' || $category == 'filemaker_solutions' ) { echo ' <li><span class="filter active" data-filter=".filemaker_solutions">FileMaker Solutions</span></li>'; } } elseif ($product == 'nrgship_ups') { // below adjust category value to be whatever the value is for the category in db if ($category == '' || $category == 'all' ) { echo ' <li><span class="filter" data-filter="all">All</span></li>'; } if ($category == '' || $category == 'shopping_carts' ) { echo ' <li><span class="filter" data-filter=".shopping_carts">Shopping Carts</span></li>'; } if ($category == '' || $category == 'marketplaces' ) { echo ' <li><span class="filter" data-filter=".marketplaces">Marketplaces</span></li>'; } if ($category == '' || $category == 'mac_software' ) { echo ' <li><span class="filter" data-filter=".mac_software">Mac Software</span></li>'; } } elseif ($product == 'nrgship_upspro') { // below adjust category value to be whatever the value is for the category in db if ($category == '' || $category == 'all' ) { echo ' <li><span class="filter" data-filter="all">All</span></li>'; } if ($category == '' || $category == 'shopping_carts' ) { echo ' <li><span class="filter" data-filter=".shopping_carts">Shopping Carts</span></li>'; } if ($category == '' || $category == 'marketplaces' ) { echo ' <li><span class="filter" data-filter=".marketplaces">Marketplaces</span></li>'; } if ($category == '' || $category == 'mac_software' ) { echo ' <li><span class="filter" data-filter=".mac_software">Mac Software</span></li>'; } } elseif ($product == 'nrgship_fedexpro') { // below adjust category value to be whatever the value is for the category in db if ($category == '' || $category == 'all' ) { echo ' <li><span class="filter" data-filter="all">All</span></li>'; } if ($category == '' || $category == 'shopping_carts' ) { echo ' <li><span class="filter" data-filter=".shopping_carts">Shopping Carts</span></li>'; } if ($category == '' || $category == 'marketplaces' ) { echo ' <li><span class="filter" data-filter=".marketplaces">Marketplaces</span></li>'; } if ($category == '' || $category == 'mac_software' ) { echo ' <li><span class="filter" data-filter=".mac_software">Mac Software</span></li>'; } } ?> </ul> </div> <!-- <div class="col-md-4"> <ul class="portfolio-topbar-desc"> <li id="showDetails"><a href="javascript:void(0);" id="port-show">Show Details</a></li> <li id="hideDetails"><a href="javascript:void(0);" id="port-hide">Hide Details</a></li> </ul> </div> --> </div> </div> <div class="row"> <div class="col-md-12"> <div class="row" id="Container"> <?php /* <a data-toggle="modal" class="btn btn-info" href="<?php echo ''.$row["Partner"].''; ?>" data-target="<?php echo ''.$row["partner_id"].''; ?>"></a> */ //http://www.nrgsoft.com/new2/shipping/common/partners_detail.php?partner_id='.$row["partner_id"].'&product_id='.$product.' //<a href="http://www.nrgsoft.com/new2/shipping/common/partners_detail.php?partner_id='.$row["partner_id"].'&product_id='.$product.'" class="thumbnail"> while($row = mysqli_fetch_assoc($result)) { //echo "<br>".$row["Partner"]."<br>".$row["Description"]."<br>".$row["Logo_Large"]."<br>".$row["Logo_Small"]."<br>".$row["PartnerURL"]."<br>" //.$row["partner_id"]."<br>".$row["PartnerCategory"]."<br>"; if ($product == 'all') { echo ' <div class="mix '.$row["PartnerCategory"].' col-md-3 col-sm-6 col-xs-12"> <a href="#" class="thumbnail"> <img src = "'.$row["Logo_Large"].'" ></a> <div class="caption-ar"> <div class="caption-content"> <a data-toggle="modal" class="btn btn-primary btn-lg btn-ar" href="products.php?partner_id='.$row["partner_id"].'" data-target="#myModal2"> More Info </a> <h4 class="caption-title">'.$row["Partner"].'</h4> </div> </div> </div> '; } elseif ($product == 'mac') { echo ' <div class="mix '.$row["PartnerCategory"].' col-md-3 col-sm-6 col-xs-12"> <a href="#" class="thumbnail"> <img src = "'.$row["Logo_Large"].'" ></a> <div class="caption-ar"> <div class="caption-content"> <a data-toggle="modal" class="btn btn-primary btn-lg btn-ar" href="'.$row["Partner"].'" data-target="#myModal2"> More Info </a> <h4 class="caption-title">'.$row["Partner"].'</h4> </div> </div> </div> '; } elseif ($product == 'filemaker') { echo ' <div class="mix '.$row["PartnerCategory"].' col-md-3 col-sm-6 col-xs-12"> <a href="#" class="thumbnail"> <img src = "'.$row["Logo_Large"].'" ></a> <div class="caption-ar"> <div class="caption-content"> <a data-toggle="modal" class="btn btn-primary btn-lg btn-ar" href="'.$row["Partner"].'" data-target="#myModal2"> More Info </a> <h4 class="caption-title">'.$row["Partner"].'</h4> </div> </div> </div> '; } else { echo ' <div class="mix '.$row["PartnerCategory"].' col-md-3 col-sm-6 col-xs-12"> <a href="#" class="thumbnail"> <img src = "'.$row["Logo_Large"].'" ></a> <div class="caption-ar"> <div class="caption-content"> <a data-toggle="modal" class="btn btn-primary btn-lg btn-ar" href="#" data-target="#"> More Info </a> <h4 class="caption-title">'.$row["Partner"].'</h4> </div> </div> </div> '; } } ?> <div class="modal" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4></h4> </div> <div class="modal-body"> <p></p> </div> <div class="modal-footer"> <button type="button" class="btn btn-ar btn-primary" data-dismiss="modal">Close</button> </div> </div> </div> </div> </div> </div> </div> </div> <!-- col-md-9 --> </div> </div> <!-- container --> <?php include ("http://www.nrgsoft.com/new2/footer.php"); ?> </div> <!-- boxed --> </div> <!-- sb-site --> <div id="back-top"> <a href="#header"><i class="glyphicon glyphicon-arrow-up"></i></a> </div> <!-- Scripts --> <!-- Include jQuery --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <script type="text/javascript"> </script> <script src="http://www.nrgsoft.com/new2/js/jquery.min.js"></script> <script src="http://www.nrgsoft.com/new2/js/jquery.cookie.js"></script> <script src="http://www.nrgsoft.com/new2/js/bootstrap.min.js"></script> <script src="http://www.nrgsoft.com/new2/js/bootstrap-switch.min.js"></script> <script src="http://www.nrgsoft.com/new2/js/wow.min.js"></script> <script src="http://www.nrgsoft.com/new2/js/slidebars.js"></script> <script src="http://www.nrgsoft.com/new2/js/jquery.bxslider.min.js"></script> <script src="http://www.nrgsoft.com/new2/js/holder.js"></script> <script src="http://www.nrgsoft.com/new2/js/buttons.js"></script> <script src="http://www.nrgsoft.com/new2/js/styleswitcher.js"></script> <script src="http://www.nrgsoft.com/new2/js/jquery.mixitup.min.js"></script> <script src="http://www.nrgsoft.com/new2/js/circles.min.js"></script> <script src="http://www.nrgsoft.com/new2/js/lightbox.min.js"></script> <!-- Syntaxhighlighter --> <script src="http://www.nrgsoft.com/new2/js/syntaxhighlighter/shCore.js"></script> <script src="http://www.nrgsoft.com/new2/js/syntaxhighlighter/shBrushXml.js"></script> <script src="http://www.nrgsoft.com/new2/js/syntaxhighlighter/shBrushJScript.js"></script> <script src="http://www.nrgsoft.com/new2/js/app.js"></script> <script src="http://www.nrgsoft.com/new2/js/portfolio.js"></script> </body> </html>
Initial URL
Initial Description
example of php code I worked on
Initial Title
php code example
Initial Tags
mysql, database, php
Initial Language
PHP