# Are we an admin? If not, force login page. if (!$user->isAdmin()) { $action = 'login'; } # Do we even have any user details? If not, force installer. if (!isset($adminDetails)) { $action = 'install'; } /***************************************************************** * Prepare template variables ******************************************************************/ # URI to self $self = ADMIN_URI; # Links to other sections of the control panel if ($user->isAdmin()) { $output->addNavigation('主页', $self); $output->addNavigation('编辑设置', $self . '?settings'); $output->addNavigation('查看日志', $self . '?logs'); #$output->addNavigation('Glype® Licenses', 'https://www.glype.com/purchase.php'); #$output->addNavigation('BlockScript®', $self.'?blockscript'); #$output->addNavigation('支持论坛', 'http://proxy.org/forum/glype-proxy/'); #$output->addNavigation('推广你的Proxy', 'https://proxy.org/advertise.shtml'); } /***************************************************************** * Process current request. ******************************************************************/ switch ($action) { /***************************************************************** * INSTALL - save an admin username/password in our settings file ******************************************************************/ case 'install':
# Are we an admin? If not, force login page. if (!$user->isAdmin()) { $action = 'login'; } # Do we even have any user details? If not, force installer. if (!isset($adminDetails)) { $action = 'install'; } /***************************************************************** * Prepare template variables ******************************************************************/ # URI to self $self = ADMIN_URI; # Links to other sections of the control panel if ($user->isAdmin()) { $output->addNavigation('Home', $self); $output->addNavigation('Edit Settings', $self . '?settings'); $output->addNavigation('View Logs', $self . '?logs'); $output->addNavigation('Glype® Licenses', 'https://www.glype.com/purchase.php'); $output->addNavigation('BlockScript®', $self . '?blockscript'); $output->addNavigation('Support Forum', 'http://proxy.org/forum/glype-proxy/'); $output->addNavigation('Promote Your Proxy', 'https://proxy.org/advertise.shtml'); } /***************************************************************** * Process current request. ******************************************************************/ switch ($action) { /***************************************************************** * INSTALL - save an admin username/password in our settings file ******************************************************************/ case 'install':
// Are we an admin? If not, force login page. if (!$user->isAdmin()) { $action = 'login'; } // Do we even have any user details? If not, force installer. if (!isset($adminDetails)) { $action = 'install'; } /***************************************************************** * Prepare template variables ******************************************************************/ // URI to self $self = ADMIN_URI; // Links to other sections of the control panel if ($user->isAdmin()) { $output->addNavigation('Home', $self); $output->addNavigation('Edit Settings', $self . '?settings'); $output->addNavigation('Cache Status', $self . '?cache'); $output->addNavigation('View Logs', $self . '?logs'); } /***************************************************************** * Process current request. ******************************************************************/ switch ($action) { /***************************************************************** * INSTALL - save an admin username/password in our settings file ******************************************************************/ case 'install': // Do we have any admin details already? if (isset($adminDetails)) { // Add error