Thejesh GN avatar Thejesh GN committed 06fd0ac

chnaged the url to pb and moved prod db to outside

Comments (0)

Files changed (5)

gui/basic/main.html

     <? foreach ($this->get('array_all_postboxes') as $post_box=>$post_box_array): ?>
       var latlng = new GLatLng(<?=$post_box_array['lat']?>,<?=$post_box_array['lan']?>);
       var infohtml = "<br><br><b><?=$post_box_array['caption']?></b><br><br>";
-      infohtml = infohtml + "<a href='<?= $this->get('BASE'); ?>/postbox/id/<?=$post_box_array['post_id']?>'>Detailed Information</a>";
+      infohtml = infohtml + "<a href='<?= $this->get('BASE'); ?>/pb/id/<?=$post_box_array['post_id']?>'>Detailed Information</a>";
       map.addOverlay(createMarker(latlng,infohtml));
     <? endforeach; ?>
 
                 <? endif; ?>
               <? endforeach; ?> 
           </ul>
-          <form class="navbar-search pull-right" method="get" action="<?= $this->get('BASE');?>/postbox/search/">
+          <form class="navbar-search pull-right" method="get" action="<?= $this->get('BASE');?>/pb/search/">
             <input type="text" class="search-query span2" name="pincode" placeholder="Pincode">
           </form>
         </div><!-- /.nav-collapse -->
     </div>
     <div class="span6">
       <div class="well">
-        25 postboxes submitted by 6 users as of <?=date('l dS \o\f F Y', strtotime("now")) ?>. 
+        7 postboxes submitted by 2 users as of <?=date('l dS \o\f F Y', strtotime("now")) ?>. 
       </div>
     </div>
   </div>
     <div class="span2">
       <div class="well">
         <h4>By Location</h4>
-        <h4><a href="<?=$this->get('BASE')?>/postbox/list/pincode">By Pincode</a></h4>
+        <h4><a href="<?=$this->get('BASE')?>/pb/list/pincode">By Pincode</a></h4>
         <h4>By Submitter</h4>
       </div>
     </div>

gui/basic/sub_list_pincode.html

 <ul>
 	<? foreach ($this->get('pincode_count_array') as $pincode=>$count): ?>
-		<li><h4><a href="<?= $this->get('BASE'); ?>/postbox/pincode/<?= $pincode;?>" ><?= $pincode; ?></a>&nbsp;&nbsp;(<?= $count; ?>)</h4></li>
+		<li><h4><a href="<?= $this->get('BASE'); ?>/pb/pincode/<?= $pincode;?>" ><?= $pincode; ?></a>&nbsp;&nbsp;(<?= $count; ?>)</h4></li>
 	<? endforeach; ?>
 </ul>

gui/basic/sub_postbox.html

 <div class="span4">
 	<img src="<?= $this->get('map') ?>"/>
 		<br><br>
-		<b>Geo:</b><a href="<?= $this->get('BASE'); ?>/postbox/location/<?= $this->get('lat');?>/<?= $this->get('lan');?>" ><?= $this->get('lat') ?>,<?= $this->get('lan') ?></a><br>
-		<b>Pincode:</b> <a href="<?= $this->get('BASE'); ?>/postbox/pincode/<?= $this->get('pincode');?>" ><?= $this->get('pincode') ?></a><br>
+		<!--<b>Geo:</b><a href="<?= $this->get('BASE'); ?>/pb/location/<?= $this->get('lat');?>/<?= $this->get('lan');?>" ><?= $this->get('lat') ?>,<?= $this->get('lan') ?></a><br>-->
+		<b>Geo:</b><?= $this->get('lat') ?>,<?= $this->get('lan') ?><br>
+		<b>Pincode:</b> <a href="<?= $this->get('BASE'); ?>/pb/pincode/<?= $this->get('pincode');?>" ><?= $this->get('pincode') ?></a><br>
 		<b>Tags :</b> <?= $this->get('tags') ?><br>
 		<b>Credit:</b> <?= $this->get('username'); ?>&nbsp;(<a href="<?= $this->get('website') ?>">Blog</a>) on <?= date('Y-m-d H:i:s',$this->get('created_time')); ?>
 </div>
 		//TODO:simple search, we will improve it later
 		$pincode = $_REQUEST['pincode'];
 		if($pincode != ""){
-			$url =$this->get('BASE').'/postbox/pincode/'.$pincode;
+			$url =$this->get('BASE').'/pb/pincode/'.$pincode;
 			$this->reroute($url);
 		}else{
 			$this->set('LANGUAGE','en-US');
 );
 
 
-$app->set('POSTBOX_DB',new DB('sqlite:./db/pb.sqlite'));
+$app->set('POSTBOX_DB',new DB('sqlite:../postbox.sqlite'));
 $app->route('GET /','Main->home');
 $app->route('GET /about','Main->about');
 $app->route('GET /contribute','Main->contribute');
 $app->route('GET /api','Main->api');
 $app->route('GET /contact','Main->contact');
 
-$app->route('GET /postbox/id/@id','Postbox->postboxById');
-$app->route('GET /postbox/list/pincode','Postbox->pincode');
-$app->route('GET /postbox/list/location','Postbox->location');
-$app->route('GET /postbox/pincode/@pincode','Postbox->postboxByPincode');
-$app->route('GET /postbox/search','Postbox->search');
-$app->route('GET /postbox/location/@lat/@long','Postbox->postboxByPincode');
+$app->route('GET /pb/id/@id','Postbox->postboxById');
+$app->route('GET /pb/list/pincode','Postbox->pincode');
+$app->route('GET /pb/list/location','Postbox->location');
+$app->route('GET /pb/pincode/@pincode','Postbox->postboxByPincode');
+$app->route('GET /pb/search','Postbox->search');
+$app->route('GET /pb/location/@lat/@long','Postbox->postboxByPincode');
 $app->route('GET /data_pull','Instagram->pull_data');
 
 $app->run();
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.