query("select reference,value from admin where reference like 'EC_IS_PUBLISHED_%'"); while ($db->next_record()) { if ($db->f("reference")=="EC_IS_PUBLISHED_GANXY" && $db->f("value")!="0") {$ecGanxy = $db->f("value");} elseif ($db->f("reference")=="EC_IS_PUBLISHED_AMAZON" && $db->f("value")!="0") {$ecAmazon = $db->f("value");} elseif ($db->f("reference")=="EC_IS_PUBLISHED_BN" && $db->f("value")!="0") {$ecBN = $db->f("value");} elseif ($db->f("reference")=="EC_IS_PUBLISHED_ISTORE" && $db->f("value")!="0") {$ecISTORE = $db->f("value");} } //*/ include_once("includes/stats.php"); if (!$_GET["clickthrough"] || $_GET["clickthrough"] == "") { // safety trap ?>
} // initialize link data $dest = $field = ""; switch ($_GET["clickthrough"]) { case 11: // direct EA $dest = "https://ganxy.com/i/30861/gary-grossman/executive-actions"; $field = "ganxyEA"; break; case 12: // direct ET $dest = "https://ganxy.com/i/30862/gary-grossman/executive-treason"; $field = "ganxyET"; break; case 13: // direct EC if ($ecGanxy) { $dest = $ecGanxy; $field = "ganxyEC"; } break; case 15: // direct OE $dest = "https://ganxy.com/i/100063/gary-grossman/old-earth"; $field = "ganxyOE"; break; case 21: // amazon EA $dest = "http://www.amazon.com/Executive-Actions-ebook/dp/B006WOEPCC"; $field = "amazonEA"; break; case 22: // amazon ET $dest = "http://www.amazon.com/Executive-Treason-Gary-H-Grossman/dp/1626811067/ref=sr_1_5?s=books&ie=UTF8&qid=1372892564&sr=1-5&keywords=executive+treason"; $field = "amazonET"; break; case 23: // amazon Saturday Morning $dest = "http://www.amazon.com/Saturday-Morning-TV-Gary-Grossman/dp/0517641143/ref=sr_1_2?ie=UTF8&qid=1326840149&sr=8-2"; $field = "amazonSatMorn"; break; case 24: // amazon EC if ($ecAmazon) { $dest = "http://www.amazon.com/Executive-Command-ebook/dp/B009P9MYGA/ref=sr_1_1_title_1_kin?s=books&ie=UTF8&qid=1372892145&sr=1-1&keywords=executive+command"; $field = "amazonEC"; } break; case 25: // amazon OE $dest = "http://www.amazon.com/Old-Earth-Gary-Grossman-ebook/dp/B00QW2SD9A/ref=sr_1_1?ie=UTF8&qid=1426034775&sr=8-1&keywords=Old+Earth+[Kindle+Edition]"; $field = "amazonOE"; break; case 26: // amazon Superman $dest = "http://www.amazon.com/gp/offer-listing/0615276911"; $field = "amazonSuperman"; break; case 31: // istore EA $dest = "http://itunes.apple.com/us/book/executive-actions/id495983395?mt=11"; $field = "istoreEA"; break; case 32: // istore ET $dest = "http://itunes.apple.com/us/book/executive-treason/id495985798?mt=11"; $field = "istoreET"; break; case 33: // istore EC if ($ecISTORE) { $dest = "https://itunes.apple.com/us/book/executive-command/id570198074?mt=11"; $field = "istoreEC"; } break; case 35: // istore OE $dest = "https://itunes.apple.com/us/book/old-earth/id950833964?mt=11&ign-mpt=uo%3D4"; $field = "istoreOE"; break; case 44: // Superman $dest = "books.html#superman"; $field = "websiteSuperman"; break; case 51: // b&n EA $dest = "http://www.barnesandnoble.com/w/executive-actions-gary-grossman/1007065124?ean=9781626811058"; $field = "bnEA"; break; case 52: // b&n ET $dest = "http://www.barnesandnoble.com/w/executive-treason-gary-grossman/1007361548?ean=9781626811065"; $field = "bnET"; break; case 53: // b&n EC if ($ecBN) { $dest = "http://www.barnesandnoble.com/w/executive-command-gary-grossman/1113424341?ean=9781626811041"; $field = "bnEC"; } break; case 55: // b&n OE $dest = "http://www.barnesandnoble.com/w/old-earth-gary-grossman/1121148137?ean=9781626816343"; $field = "bnOE"; break; case 61: // kobo EA $dest = "http://store.kobobooks.com/en-us/books/Executive-Actions/vd9dtcmiHEiP1TXOHNyOrQ"; $field = "koboEA"; break; case 62: // kobo ET $dest = "http://store.kobobooks.com/en-us/books/Executive-Treason/5A0SOUlYA0u_kUQMNaE5Tg"; $field = "koboET"; break; case 64: // kobo EC $dest = "http://www.kobobooks.com/ebook/Executive-Command/book-c72z3Cf1uUeMgBNDY-AUNg/page1.html?s=9_vf6iocM06zRmtb7v9vEA&r=1"; $field = "koboEC"; break; case 65: // kobo OE $dest = "https://store.kobobooks.com/en-US/ebook/old-earth"; $field = "koboOE"; break; case 75: // indiebound OE print $dest = "http://www.indiebound.org/book/9781626816343"; $field = "indieOE"; break; case 91: // Omnibus Direct $dest = "https://ganxy.com/i/96713/gary-grossman/the-executive-series-omnibus-edition"; $field = "omniDirect"; break; case 92: // Omnibus Amazon $dest = "http://www.amazon.com/gp/product/B00NLEZUG6/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00NLEZUG6&linkCode=as2&tag=wwwdiversio08-20&linkId=WNAZI547AIGHY7B3"; $field = "omniAmazon"; break; case 93: // Omnibus iBookstore $dest = "https://itunes.apple.com/us/book/executive-series-omnibus-edition/id919119363?mt=11&ign-mpt=uo%3D4"; $field = "omniIbookstore"; break; case 94: // Omnibus B&N $dest = "http://www.barnesandnoble.com/w/the-executive-series-gary-grossman/1120347183?ean=2940150683068&cm_mmc=AFFILIATES-_-Linkshare-_-7W0jeRqnKFU-_-10:1&r=1"; $field = "omniBandN"; break; case 95: // Omnibus Kobo $dest = "http://store.kobobooks.com/en-US/ebook/the-executive-series-omnibus-edition?utm_source=linkshare_us&utm_medium=Affiliate&utm_campaign=linkshare_us&siteID=7W0jeRqnKFU-Yf8ocAcL82dL4IRkBDFIKA"; $field = "omniKobo"; break; } // tally the clickthrough if ($dest && $field) { $db->query(" insert into clickthroughs (cart,".$field.",clicktime) values ('".$id_num."','1','".date("Y-m-d H:i:s")."') "); // send them off header("Location:$dest"); } exit; ?>