Example #1
0
 function testPathConversion()
 {
     // Tests semplici
     $this->assertEqual(UrlBridge::ToMobile(DESKTOP_VERSION_URL . "/p/extras/forum/"), MOBILE_VERSION_URL . "/p/forum/");
     $this->assertEqual(UrlBridge::ToDesktop(MOBILE_VERSION_URL . "/p/forum/"), DESKTOP_VERSION_URL . "/p/extras/forum/");
     $this->assertEqual(UrlBridge::ToMobile(DESKTOP_VERSION_URL . "/p/login/cpanel/mail/"), MOBILE_VERSION_URL . "/p/user/panels/messages/");
     $this->assertEqual(UrlBridge::ToDesktop(MOBILE_VERSION_URL . "/p/user/panels/messages/index.php"), DESKTOP_VERSION_URL . "/p/login/cpanel/mail/index.php");
     // Piu' complessi
     $this->assertEqual(UrlBridge::ToMobile(DESKTOP_VERSION_URL . "/p/extras/forum/23/23-test/?p=1#p213"), MOBILE_VERSION_URL . "/p/forum/23/23-test/?p=1#p213");
     // #######################################
     // Test Guide
     $this->assertEqual(UrlBridge::ToMobile(DESKTOP_VERSION_URL . "/p/guide/Guida_Pascal/"), MOBILE_VERSION_URL . "/p/guide/5-Guida_Pascal/");
     $this->assertEqual(UrlBridge::ToDesktop(MOBILE_VERSION_URL . "/p/guide/5-Guida_Pascal/"), DESKTOP_VERSION_URL . "/p/guide/Guida_Pascal/");
     $this->assertEqual(UrlBridge::ToMobile(DESKTOP_VERSION_URL . "/p/guide/Guida_Pascal/Introduzione_alla_programmazione/"), MOBILE_VERSION_URL . "/p/guide/5-Guida_Pascal/1-Introduzione_alla_programmazione/");
     $this->assertEqual(UrlBridge::ToDesktop(MOBILE_VERSION_URL . "/p/guide/5-Guida_Pascal/1-Introduzione_alla_programmazione/"), DESKTOP_VERSION_URL . "/p/guide/Guida_Pascal/Introduzione_alla_programmazione/");
 }
Example #2
0
<!-- Mobile pierotofy.it -->
<ins class="adsbygoogle"
     style="display:inline-block;width:320px;height:50px"
     data-ad-client="ca-pub-3144450577280402"
     data-ad-slot="8674430179"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>

	<div id="footer">
		<a href="<?php 
echo DESKTOP_VERSION_URL;
?>
/nomobile.php?url=<?php 
echo urlencode(UrlBridge::ToDesktop($_SERVER["REQUEST_URI"]));
?>
">Versione classica</a> | 
		<a href="<?php 
echo "http://svn.pierotofy.it/filedetails.php?repname=mobile-devel&path=" . urlencode(str_replace("/mobile/", "/", str_replace($home_dir, "/", $_SERVER['SCRIPT_NAME'])));
?>
">Vedi il sorgente</a>
	</div><!-- /footer -->
</div><!-- /container -->
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-6669942-11', 'pierotofy.it');