This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class citygridplaces { | |
| private $publishercode; | |
| private $dbserver; | |
| private $dbname; | |
| private $dbuser; | |
| private $dbpassword; | |
| public function __construct($publishercode) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class citygridads { | |
| private $publishercode; | |
| private $dbserver; | |
| private $dbname; | |
| private $dbuser; | |
| private $dbpassword; | |
| public function __construct($publishercode) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include "citygrid-api-class.php"; | |
| $publishercode = "[your publisher code]"; | |
| $placement=null; | |
| $has_offers=false; | |
| $histograms=false; | |
| $i=null; | |
| $format='json'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include "citygrid-api-class.php"; | |
| $publishercode = "[your publisher code]"; | |
| $phone=null; | |
| $customer_only=null; | |
| $placement = null; | |
| $all_results=null; | |
| $review_count=null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class citygridplaces(object): | |
| def srchplaceswhere(self,what,type,where,page,rpp,sort,rformat,placement,hasoffers,histograms,i,publishercode): | |
| qStr = {'publisher':publishercode, 'sort':sort, 'page':page, 'rpp':rpp} | |
| url = "http://api.citygridmedia.com/content/places/v2/search/where?" | |
| if len(what) > 0: | |
| qStr['what'] = what |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class citygridadvertising(object): | |
| def displaywebad300x250(self,adid,publisher,what,where): | |
| returnAd = '<div id="sidebar_ad_slot_' + adid + '"></div>\r' | |
| returnAd += '<script type="text/javascript">\r' | |
| returnAd += "new CityGrid.Ads('sidebar_ad_slot_" + adid + "', {\r" | |
| returnAd += " collection_id: 'web-002-300x250',\r" | |
| returnAd += " publisher: '" + publisher + "',\r" | |
| returnAd += " what:'" + what + "',\r" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "class-citygrid-places-api.py" | |
| what = escape(unquote(str(req.__getattribute__('args')))) | |
| what = what.replace("amp;", ""); #why does this need to happen? | |
| querystring = dict(item.split("=") for item in what.split("&")) | |
| # what | |
| try: | |
| what = querystring['what'] | |
| except: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "class-citygrid-places-api.py" | |
| args = escape(unquote(str(req.__getattribute__('args')))) | |
| qString = args.replace("amp;", ""); #why does this need to happen? | |
| querystring = dict(item.split("=") for item in qString.split("&")) | |
| id = querystring['id'] | |
| what = querystring['what'] | |
| where = querystring['where'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% | |
| class CityGridPlaces | |
| def initialize() | |
| end | |
| def srchplaceswhere(what,type,where,page,rpp,sort,rformat,placement,hasoffers,histograms,i,publishercode) | |
| @rooturl = "http://api.citygridmedia.com/content/places/v2/search/where?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% | |
| class CityGridAdvertising | |
| def initialize() | |
| end | |
| def displaywebad300x250(adid,publisher,what,where) | |
| @returnAd = '<div id="sidebar_ad_slot_' + adid + '"></div>' + "\n" |