Index: trunk/admin/reviews.php =================================================================== diff -u -r1510 -r1566 --- trunk/admin/reviews.php (.../reviews.php) (revision 1510) +++ trunk/admin/reviews.php (.../reviews.php) (revision 1566) @@ -12,62 +12,86 @@ ## result in revocation of the license and support ## ## privileges along maximum prosecution allowed by law. ## ############################################################## -//$pathtoroot=""; +//KERNEL4 STARTUP - FOR ACTIONS HANDLING + +function k4getmicrotime() +{ + list($usec, $sec) = explode(" ", microtime()); + return ((float)$usec + (float)$sec); +} + +$start = k4getmicrotime(); + +define('ADMIN', 1); +define('FULL_PATH', realpath(dirname(__FILE__).'/..')); +define('APPLICATION_CLASS', 'MyApplication'); +define('ADMINS_LIST','/in-portal/users/users.php'); +include_once(FULL_PATH."/kernel/kernel4/startup.php"); + +$application =& kApplication::Instance(); +$application->Init(); + +$application->SetVar('t', 'in-commerce/products/products_reviews_section'); + +$application->Run(); + +//KERNEL4 END + define('REQUIRE_LAYER_HEADER', 1); $b_topmargin = "0"; //$b_header_addon = "

"; -if(!strlen($pathtoroot)) +if( !(isset($pathtoroot) && $pathtoroot) ) { - $path=dirname(realpath(__FILE__)); - if(strlen($path)) - { - /* determine the OS type for path parsing */ - $pos = strpos($path,":"); - if ($pos === false) - { - $gOS_TYPE="unix"; - $pathchar = "/"; - } - else - { - $gOS_TYPE="win"; - $pathchar="\\"; - } - $p = $path.$pathchar; - /*Start looking for the root flag file */ - while(!strlen($pathtoroot) && strlen($p)) - { - $sub = substr($p,strlen($pathchar)*-1); - if($sub==$pathchar) - { - $filename = $p."root.flg"; - } - else - $filename = $p.$pathchar."root.flg"; - if(file_exists($filename)) - { - $pathtoroot = $p; - } - else - { - $parent = realpath($p.$pathchar."..".$pathchar); - if($parent!=$p) - { - $p = $parent; - } - else - $p = ""; - } - } - if(!strlen($pathtoroot)) - $pathtoroot = ".".$pathchar; - } - else - { - $pathtoroot = ".".$pathchar; - } + $path=dirname(realpath(__FILE__)); + if(strlen($path)) + { + /* determine the OS type for path parsing */ + $pos = strpos($path,":"); + if ($pos === false) + { + $gOS_TYPE="unix"; + $pathchar = "/"; + } + else + { + $gOS_TYPE="win"; + $pathchar="\\"; + } + $p = $path.$pathchar; + /*Start looking for the root flag file */ + while(!strlen($pathtoroot) && strlen($p)) + { + $sub = substr($p,strlen($pathchar)*-1); + if($sub==$pathchar) + { + $filename = $p."root.flg"; + } + else + $filename = $p.$pathchar."root.flg"; + if(file_exists($filename)) + { + $pathtoroot = $p; + } + else + { + $parent = realpath($p.$pathchar."..".$pathchar); + if($parent!=$p) + { + $p = $parent; + } + else + $p = ""; + } + } + if(!strlen($pathtoroot)) + $pathtoroot = ".".$pathchar; + } + else + { + $pathtoroot = ".".$pathchar; + } } $sub = substr($pathtoroot,strlen($pathchar)*-1); @@ -348,8 +372,10 @@ include_once($path); } } + $admin = $objConfig->Get("AdminDirectory"); + if(!strlen($admin)) $admin = "admin"; ?> -
+