diff --git a/app/admin/2fa/edit_user.php b/app/admin/2fa/edit_user.php index fe8c112540ee280e9c808bdf0d889cbeb9ecabaf..3e1ba016f3490e3c76e5ceb3b1f7b8cac9b07ebf 100644 --- a/app/admin/2fa/edit_user.php +++ b/app/admin/2fa/edit_user.php @@ -16,6 +16,9 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(true); + // check id if(!is_numeric($_POST['id'])) { $Result->show("danger", _("Invalid id"), true, true); } diff --git a/app/admin/2fa/save.php b/app/admin/2fa/save.php index dc2063f19913ac9147d47f130d89e38a95352b33..7158cce69aef7ba3a026b19f9f8ba64da3eecb03 100644 --- a/app/admin/2fa/save.php +++ b/app/admin/2fa/save.php @@ -16,6 +16,9 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); + // validate csrf cookie $User->Crypto->csrf_cookie ("validate", "2fa", $_POST['csrf_cookie']) === false ? $Result->show("danger", _("Invalid CSRF cookie"), true) : ""; diff --git a/app/admin/api/edit-result.php b/app/admin/api/edit-result.php index 9958cc62ed162a16816b3ed6607f6c91389fb80f..3e1aa133d54c142ea9092463af27ef226ea7843d 100755 --- a/app/admin/api/edit-result.php +++ b/app/admin/api/edit-result.php @@ -15,6 +15,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); diff --git a/app/admin/authentication-methods/edit-result.php b/app/admin/authentication-methods/edit-result.php index 9644ea8301fae1d1f56850977684714382648333..5fb8723ca004737338a666d903b4770e798a828e 100644 --- a/app/admin/authentication-methods/edit-result.php +++ b/app/admin/authentication-methods/edit-result.php @@ -16,6 +16,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); diff --git a/app/admin/groups/add-users-result.php b/app/admin/groups/add-users-result.php index 72ec4616e33cf60ec8fb93f1b40e0c829507b1d8..ae8d9c3795396ed4c07b063f5729699d3669ca73 100755 --- a/app/admin/groups/add-users-result.php +++ b/app/admin/groups/add-users-result.php @@ -15,6 +15,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); @@ -59,6 +61,4 @@ if(isset($errors)) { } else { $Result->show("success", _('Users added to group'), true); -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/app/admin/groups/edit-group-result.php b/app/admin/groups/edit-group-result.php index 9528d929a2ea465cee6436574251935ab7d8c9e4..afe5d987acbd4ed14616247faa05b970b6db098e 100755 --- a/app/admin/groups/edit-group-result.php +++ b/app/admin/groups/edit-group-result.php @@ -17,6 +17,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); diff --git a/app/admin/groups/remove-users-result.php b/app/admin/groups/remove-users-result.php index f893ed43ed63363303d25a5b6378c390d13d734d..03a731c33ff24c60e330f29e4e7cca97b0454608 100755 --- a/app/admin/groups/remove-users-result.php +++ b/app/admin/groups/remove-users-result.php @@ -15,6 +15,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); @@ -55,6 +57,4 @@ if(isset($errors)) { } else { $Result->show("success", _('Users removed from group'), true); -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/app/admin/languages/edit-result.php b/app/admin/languages/edit-result.php index 069dee29594972a876c28d8dc646a60060808bed..3040a7ba08d706cc902ba1a689bfc0b4b88c803b 100755 --- a/app/admin/languages/edit-result.php +++ b/app/admin/languages/edit-result.php @@ -16,6 +16,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); @@ -37,5 +39,4 @@ $values = array("l_id"=>@$_POST['l_id'], # update if(!$Admin->object_modify("lang", $_POST['action'], "l_id", $values)) { $Result->show("danger", _("Language $_POST[action] error"), true); } -else { $Result->show("success", _("Language $_POST[action] success"), true); } -?> \ No newline at end of file +else { $Result->show("success", _("Language $_POST[action] success"), true); } \ No newline at end of file diff --git a/app/admin/mail/edit.php b/app/admin/mail/edit.php index 93fbc39af22cd117e40626948c37e05e557d2b5f..92c93efaee5e834f34f0a8a322b1c214995069a0 100755 --- a/app/admin/mail/edit.php +++ b/app/admin/mail/edit.php @@ -15,6 +15,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); @@ -36,5 +38,4 @@ $values = array("id"=>1, # update if(!$Admin->object_modify("settingsMail", "edit", "id", $values)) { $Result->show("danger", _('Cannot update settings').'!', true); } -else { $Result->show("success", _('Settings updated successfully')."!", true); } -?> \ No newline at end of file +else { $Result->show("success", _('Settings updated successfully')."!", true); } \ No newline at end of file diff --git a/app/admin/mail/test-mail.php b/app/admin/mail/test-mail.php index 0d2307c2f8eb160a8577d1c742f2aebe1d96c7b7..48c161da1e453ccb3bc685f2158d06ba94977d56 100755 --- a/app/admin/mail/test-mail.php +++ b/app/admin/mail/test-mail.php @@ -15,6 +15,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # try to send try { @@ -51,5 +53,4 @@ try { } //if error not sent print ok -$Result->show("success alert-absolute", "Message sent to site admin (".$User->settings->siteAdminMail.")!", true); -?> \ No newline at end of file +$Result->show("success alert-absolute", "Message sent to site admin (".$User->settings->siteAdminMail.")!", true); \ No newline at end of file diff --git a/app/admin/password-policy/save.php b/app/admin/password-policy/save.php index 9b68b23d053e5eb6545289f8397485db759e57cf..e2d9d82e52ab5ead26e09b3ab6e7869b38e21ec4 100644 --- a/app/admin/password-policy/save.php +++ b/app/admin/password-policy/save.php @@ -16,6 +16,8 @@ $Params = new Params ($_POST); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # validate csrf cookie $User->Crypto->csrf_cookie ("validate", "settings", $Params->csrf_cookie) === false ? $Result->show("danger", _("Invalid CSRF cookie"), true) : ""; diff --git a/app/admin/powerDNS/defaults-save.php b/app/admin/powerDNS/defaults-save.php index ea0148066d25cf14cb1621581712d90d9d004ddf..f6c20eb9dd32d5f29a3894dfe7428bd93b2548e5 100644 --- a/app/admin/powerDNS/defaults-save.php +++ b/app/admin/powerDNS/defaults-save.php @@ -15,6 +15,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); diff --git a/app/admin/powerDNS/settings-save.php b/app/admin/powerDNS/settings-save.php index 18a1acb12344b1790da87bf09483d4e07a733b09..503859923bdc44996c7749ff5b34f535737c10fa 100644 --- a/app/admin/powerDNS/settings-save.php +++ b/app/admin/powerDNS/settings-save.php @@ -15,6 +15,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); diff --git a/app/admin/scan-agents/edit-result.php b/app/admin/scan-agents/edit-result.php index eddf869a8c21fa12ac34d16f1309bd92a3696af8..67b8cc289ae93954dc8563b57805d41ed18ffb4d 100644 --- a/app/admin/scan-agents/edit-result.php +++ b/app/admin/scan-agents/edit-result.php @@ -15,6 +15,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); @@ -85,6 +87,4 @@ else { // references removed $Result->show("info", _("Scan agent references removed")); } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/app/admin/sections/edit-result.php b/app/admin/sections/edit-result.php index ecbf01d31c22e4fc475982db1c7798aec0d6115c..3661590b65cafddd1ecce226c649580c75849f65 100755 --- a/app/admin/sections/edit-result.php +++ b/app/admin/sections/edit-result.php @@ -18,6 +18,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); @@ -122,4 +124,4 @@ else { // apply permission changes $Subnets->set_permissions ($section_subnets, $removed_permissions, $changed_permissions); } -} +} \ No newline at end of file diff --git a/app/admin/settings/settings-save.php b/app/admin/settings/settings-save.php index 5a0797fec97ad392d649d99f42c31aa379790ff9..f2c6aa1d9317db98b300789b13225c8a4523b876 100755 --- a/app/admin/settings/settings-save.php +++ b/app/admin/settings/settings-save.php @@ -16,6 +16,8 @@ $Result = new Result (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # validate csrf cookie $User->Crypto->csrf_cookie ("validate", "settings", $_POST['csrf_cookie']) === false ? $Result->show("danger", _("Invalid CSRF cookie"), true) : ""; diff --git a/app/admin/users/edit-result.php b/app/admin/users/edit-result.php index 38a59bacd4ab1dcf37bf67080a8b743549d348ee..8cc518d795e488d69838d34c1eb1d06341ea6f44 100755 --- a/app/admin/users/edit-result.php +++ b/app/admin/users/edit-result.php @@ -17,6 +17,8 @@ $Password_check = new Password_check (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # check maintaneance mode $User->check_maintaneance_mode (); diff --git a/app/admin/verify-database/fix.php b/app/admin/verify-database/fix.php index 7a35c8e5f71b9270698ffb6b9073656a0751aa5f..5d03211511ce774cfa9e401d6c651afba0a81961 100755 --- a/app/admin/verify-database/fix.php +++ b/app/admin/verify-database/fix.php @@ -37,5 +37,4 @@ else { else { $Result->show("danger", _("Wrong parameters"), true); } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/app/admin/verify-database/index.php b/app/admin/verify-database/index.php index 400323d8693fc055c855a125ee163b8217b14a43..aacbde3ce64d3ba3adefee234852b93af8820487 100755 --- a/app/admin/verify-database/index.php +++ b/app/admin/verify-database/index.php @@ -117,6 +117,4 @@ print "<h4>"._('Missing indexes').'</h4><hr>'; if($Tools->verify_database_indexes()===true) { $Result->show ("success", _("No missing indexes detected"), false); -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/app/dashboard/index.php b/app/dashboard/index.php index bd5bc7ed9dc0afad29aed8fafd5b537ccd155b8f..13dbadec3b91458a0cb68a61a5a5acb15808bf1d 100755 --- a/app/dashboard/index.php +++ b/app/dashboard/index.php @@ -145,6 +145,9 @@ if(sizeof($uwidgets)>1) { print '<div class="row-fluid">'; + if(defined('IS_DEMO')) + print '<div class="alert alert-info" style="margin:auto;text-align:center;margin:10px;"><i class="fa fa-info fa-pad-right"></i> You can download latest phpIPAM version <a href="https://phpipam.net/download/" target="_blank">here</a>!</div>'; + foreach($uwidgetschunk as $w) { # print itams in a row foreach($w as $c) { diff --git a/app/login/login_form.php b/app/login/login_form.php index 072df17b670a8359e64b90679eddf3a231dca31f..22e6bf9cb3da71ed182d98fe7b38d41dfb4d712d 100755 --- a/app/login/login_form.php +++ b/app/login/login_form.php @@ -115,6 +115,30 @@ <div id="loginCheckPasskeys" class="col-xs-12 text-center"></div> <?php } ?> + <?php if(defined('IS_DEMO')) { ?> + + </div> + + <div class="alert alert-warning" style="width:400px;margin:auto;margin-top:30px;"> + <strong>Demo accounts:</strong> + <span class="pull-right"> + <!-- Place this tag where you want the +1 button to render --> + <g:plusone size="medium" class='pull-right'></g:plusone> + <!-- Place this render call where appropriate --> + <script type="text/javascript"> + (function() { + var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; + po.src = 'https://apis.google.com/js/plusone.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); + })(); + </script> + </span> + <hr> + <strong>Admin demo:</strong> Admin / ipamadmin<br> + <strong>Viewer demo:</strong> demo / demo1234<br> + + <?php } ?> + </div> </form> diff --git a/app/subnets/scan/subnet-scan-execute-scan-icmp.php b/app/subnets/scan/subnet-scan-execute-scan-icmp.php index 4ea3fe7dc53268b71c0867a80b6ad561574e373f..d825a7176c4ad07df52ed77ce7b96c6b4ff167cd 100644 --- a/app/subnets/scan/subnet-scan-execute-scan-icmp.php +++ b/app/subnets/scan/subnet-scan-execute-scan-icmp.php @@ -3,6 +3,9 @@ # Check we have been included and not called directly require( dirname(__FILE__) . '/../../../functions/include-only.php' ); +# check if site is demo +$User->is_demo(); + /* * Discover new hosts with ping *******************************/ diff --git a/app/subnets/scan/subnet-scan-execute-scan-snmp-arp.php b/app/subnets/scan/subnet-scan-execute-scan-snmp-arp.php index 4ea92847d87a0ff96edb6cbc45a7b83dad60f258..130e19ac05291b2120bfe2c7f0ad3d0b373cae25 100644 --- a/app/subnets/scan/subnet-scan-execute-scan-snmp-arp.php +++ b/app/subnets/scan/subnet-scan-execute-scan-snmp-arp.php @@ -3,6 +3,9 @@ # Check we have been included and not called directly require( dirname(__FILE__) . '/../../../functions/include-only.php' ); +# check if site is demo +$User->is_demo(); + # Don't corrupt output with php errors! disable_php_errors(); diff --git a/app/subnets/scan/subnet-scan-execute-scan-telnet.php b/app/subnets/scan/subnet-scan-execute-scan-telnet.php index eacf5c39aa63225c2156a0b6664ebdb20efc7ec9..b51e0f3518e0be3938e640575e84d42570bd23f7 100755 --- a/app/subnets/scan/subnet-scan-execute-scan-telnet.php +++ b/app/subnets/scan/subnet-scan-execute-scan-telnet.php @@ -3,6 +3,9 @@ # Check we have been included and not called directly require( dirname(__FILE__) . '/../../../functions/include-only.php' ); +# check if site is demo +$User->is_demo(); + /* * Discover new hosts with telnet scan *******************************/ diff --git a/app/subnets/scan/subnet-scan-execute-snmp-mac.php b/app/subnets/scan/subnet-scan-execute-snmp-mac.php index cd4572d2979a96f2280e629b0bcffad41d1c9ae5..7cd4d8d0c295e68dc08464306c870e9c161e155a 100644 --- a/app/subnets/scan/subnet-scan-execute-snmp-mac.php +++ b/app/subnets/scan/subnet-scan-execute-snmp-mac.php @@ -3,6 +3,9 @@ # Check we have been included and not called directly require( dirname(__FILE__) . '/../../../functions/include-only.php' ); +# check if site is demo +$User->is_demo(); + # Don't corrupt output with php errors! disable_php_errors(); diff --git a/app/subnets/scan/subnet-scan-execute-snmp-route-all.php b/app/subnets/scan/subnet-scan-execute-snmp-route-all.php index 4216272a01ca8014f43c974d45973b8cfa4ba26c..e64bf950efdfe28f9fe32ee7bf37b06beba4235f 100644 --- a/app/subnets/scan/subnet-scan-execute-snmp-route-all.php +++ b/app/subnets/scan/subnet-scan-execute-snmp-route-all.php @@ -3,6 +3,9 @@ # Check we have been included and not called directly require( dirname(__FILE__) . '/../../../functions/include-only.php' ); +# check if site is demo +$User->is_demo(); + # Don't corrupt output with php errors! disable_php_errors(); diff --git a/app/subnets/scan/subnet-scan-execute-snmp-route.php b/app/subnets/scan/subnet-scan-execute-snmp-route.php index 836a5c566c61294f1c9daec2d19dec7eff8fe9a6..1e1ee65ebb85ad6c63aa72e596d09a5bf8c2aeb6 100644 --- a/app/subnets/scan/subnet-scan-execute-snmp-route.php +++ b/app/subnets/scan/subnet-scan-execute-snmp-route.php @@ -3,6 +3,9 @@ # Check we have been included and not called directly require( dirname(__FILE__) . '/../../../functions/include-only.php' ); +# check if site is demo +$User->is_demo(); + # Don't corrupt output with php errors! disable_php_errors(); diff --git a/app/subnets/scan/subnet-scan-execute-update-icmp.php b/app/subnets/scan/subnet-scan-execute-update-icmp.php index a61691a0a438791cf61f2a202d50f4ff716f4993..5ec099ce07ab09cc89e6459d7c3854d990c9c52a 100755 --- a/app/subnets/scan/subnet-scan-execute-update-icmp.php +++ b/app/subnets/scan/subnet-scan-execute-update-icmp.php @@ -3,6 +3,9 @@ # Check we have been included and not called directly require( dirname(__FILE__) . '/../../../functions/include-only.php' ); +# check if site is demo +$User->is_demo(); + /* * Update alive status of all hosts in subnet ***************************/ diff --git a/app/subnets/scan/subnet-scan-execute-update-snmp-arp.php b/app/subnets/scan/subnet-scan-execute-update-snmp-arp.php index cebeb6fb1e60a4ebebc7e3909a759e85852dbacf..2601890664881d7e290c92a582f52fb01b58eca5 100644 --- a/app/subnets/scan/subnet-scan-execute-update-snmp-arp.php +++ b/app/subnets/scan/subnet-scan-execute-update-snmp-arp.php @@ -3,6 +3,9 @@ # Check we have been included and not called directly require( dirname(__FILE__) . '/../../../functions/include-only.php' ); +# check if site is demo +$User->is_demo(); + # Don't corrupt output with php errors! disable_php_errors(); diff --git a/app/tools/user-menu/2fa_save.php b/app/tools/user-menu/2fa_save.php index 61d381323048995fe0fd57ab0a7b76220a4c464d..0ac748ee431a4542bee6bdbd2a1c6e5591498214 100644 --- a/app/tools/user-menu/2fa_save.php +++ b/app/tools/user-menu/2fa_save.php @@ -19,6 +19,8 @@ $ga = new PHPGangsta_GoogleAuthenticator(); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # validate csrf cookie $User->Crypto->csrf_cookie ("validate", "user-menu", $_POST['csrf_cookie']) === false ? $Result->show("danger", _("Invalid CSRF cookie"), true) : ""; diff --git a/app/tools/user-menu/user-edit.php b/app/tools/user-menu/user-edit.php index edbeb1fc4602483327d888441a59abe53f11d355..0224a5b3bb7ff6479faf87403f972c3d5d6abe30 100755 --- a/app/tools/user-menu/user-edit.php +++ b/app/tools/user-menu/user-edit.php @@ -19,6 +19,8 @@ $Password_check = new Password_check (); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # validate csrf cookie $User->Crypto->csrf_cookie ("validate", "user-menu", $_POST['csrf_cookie']) === false ? $Result->show("danger", _("Invalid CSRF cookie"), true) : ""; diff --git a/app/tools/user-menu/user-widgets-set.php b/app/tools/user-menu/user-widgets-set.php index 36e34878ba958b137a0707b9dbf23df2547c69ca..233573a5624a6330cd179239442c0a173484d4c4 100755 --- a/app/tools/user-menu/user-widgets-set.php +++ b/app/tools/user-menu/user-widgets-set.php @@ -16,11 +16,12 @@ $User = new User ($Database); # verify that user is logged in $User->check_user_session(); +# check if site is demo +$User->is_demo(); # validate csrf cookie $User->Crypto->csrf_cookie ("validate", "user-menu", $_POST['csrf_cookie']) === false ? $Result->show("danger", _("Invalid CSRF cookie"), true) : ""; /* save widgets */ if (!$User->self_update_widgets ($_POST['widgets'])) { $Result->show("danger", _('Error updating'),true); } -else { $Result->show("success", _('Widgets updated'),true); } -?> \ No newline at end of file +else { $Result->show("success", _('Widgets updated'),true); } \ No newline at end of file diff --git a/functions/classes/class.User.php b/functions/classes/class.User.php index 7a92941bd0af45a7506f75b8ac94a272bd26ed25..515ad5adb06a004be5c7046eceb48fd90b509d43 100644 --- a/functions/classes/class.User.php +++ b/functions/classes/class.User.php @@ -2083,6 +2083,21 @@ class User extends Common_functions { return $level=="0" ? "<span class='badge badge1 badge5 alert-danger'>"._($this->parse_permissions ($level))."</span>" : "<span class='badge badge1 badge5 alert-success'>"._($this->parse_permissions ($level))."</span>"; } + /** + * Stops script execution if demo flag is set. + * This is used to simplify updating of phpipam demo page + * + * Store below to config.php: + * define('IS_DEMO', true); + * + * @method is_demo + * @param bool $popup + * @return bool + */ + public function is_demo ($popup = false) { + !defined('IS_DEMO') ? : $this->Result->show("danger", "<h4>Demo website !</h4><hr>This script is disabled in demo page!", true, $popup); + } + } /** * Fake User object for install/scripts diff --git a/index.php b/index.php index a272f19bd22434879fc3c66fafd5f355bedbc9fd..46e7cf8a045e3bcec2e499da17c918c8cb67b540 100755 --- a/index.php +++ b/index.php @@ -72,9 +72,14 @@ else { <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Cache-Control" content="no-cache, must-revalidate"> - <meta name="Description" content=""> <meta name="title" content="<?php print $title = $User->get_site_title ($_GET); ?>"> + <?php if(defined('IS_DEMO')) { ?> + <meta name="Description" content="phpIPAM demo page. phpIPAM is an open-source web IP address management application. Its goal is to provide light and simple IP address management application. It is ajax-based using jQuery libraries, it uses php scripts and javascript and some HTML5/CSS3 features. More info on phpipam website."> + <meta name="robots" content="index, follow"> + <?php } else { ?> <meta name="robots" content="noindex, nofollow"> + <meta name="Description" content=""> + <?php } ?> <meta http-equiv="X-UA-Compatible" content="IE=9" > <meta name="viewport" content="width=device-width, initial-scale=0.7, maximum-scale=1, user-scalable=yes"> @@ -129,6 +134,21 @@ else { <!-- jQuery UI --> <script src="js/jquery-ui-1.12.1.custom.min.js?v=<?php print SCRIPT_PREFIX; ?>"></script> + <?php if(defined('IS_DEMO')) { ?> + <!-- GA --> + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-11778671-10']); + _gaq.push(['_trackPageview']); + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + + </script> + <?php } ?> + </head> <!-- body -->