public function system() { require_once PATH_CONTROLLERS . 'main.php'; G::loadClass('system'); $skinsList = System::getSkingList(); foreach ($skinsList['skins'] as $key => $value) { if ($value['SKIN_WORKSPACE'] != 'Global') { unset($skinsList['skins'][$key]); } } $skins = array(); $timeZonesList = System::getAllTimeZones(); $timeZonesList = array_keys($timeZonesList); $mainController = new Main(); $languagesList = $mainController->getLanguagesList(); $sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini'); foreach ($skinsList['skins'] as $skin) { $skins[] = array($skin['SKIN_FOLDER_ID'], $skin['SKIN_NAME']); } foreach ($timeZonesList as $tz) { $timeZones[] = array($tz, $tz); } $this->includeExtJS('admin/system'); //G::LoadClass('configuration'); // $c = new Configurations(); // $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']); // $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20; $this->setJSVar('skinsList', $skins); $this->setJSVar('languagesList', $languagesList); $this->setJSVar('timeZonesList', $timeZones); $this->setJSVar('sysConf', $sysConf); G::RenderPage('publish', 'extJs'); }
public function Enviar_Notas_Finales() { $main = new Main(); $main->criterio = $_REQUEST['idproyecto']; $alumnos = $main->getDatos_grilla_alumnos(); $obj = new notasproyecto(); $resp = $obj->Enviar_notas_finales($alumnos, $_REQUEST['idproyecto']); echo json_encode($resp); }
public static function _main() { self::$printer = new FuturePrinter(); $main = new Main(); $main->start(); echo Thread::code(), " is printing...", PHP_EOL; self::$printer->_print("Hello, world (1)."); self::$printer->_print("Hello, world (2)."); self::$printer->_print("Hello, world (3)."); }
public static function start() { if (URI::getUri(true) == '?logout') { UserData::$status = false; } $template = new Main(); $template->renderHead(); $template->renderMainContent(); $template->renderFooter(); echo URI::getID(); // Objects::select(); }
public function __construct($table = null) { $fw = new Main(); $fw->loadConfig("database.php"); $fw->loadConfig("system.php"); $this->configs = $fw->configs; $this->db_type = $this->configs['mysql']['type']; if ($this->connect()) { $this->selectDb($this->configs['mysql']['database']); if ($table != null) { $this->setTable($this->configs['mysql']['prefix'] . $table); return true; } } }
function __construct() { if (Main::$con == FALSE) { Main::openConnection(); } $this->doInstall(); }
public static function getInstance() { if (self::$instance == false) { self::$instance = new Main(); } return self::$instance; }
public static function RegisterUser($regData) { global $db; $info = ['emptyData' => false, 'emailUse' => false, 'userUse' => false, 'falseEmail' => false, 'pwNotMatch' => false, 'success' => false]; if (empty($regData['username']) || empty($regData['email']) || empty($regData['password'])) { $info['emptyData'] = true; } else { if ($regData['password'] != $regData['password2']) { $info['pwNotMatch'] = true; } else { if (!Main::ValidEmail($regData['email'])) { $info['falseEmail'] = true; } else { $regData['username'] = $db->SafeString($regData['username']); $regData['email'] = $db->SafeString($regData['email']); $regData['password'] = $db->SafeString($regData['password']); $mailCheck = Registration::CheckEmail($regData['email']); $userCheck = Registration::CheckUsername($regData['username']); if (!$mailCheck && !$userCheck) { $password = Main::HyperHash($regData['password']); $q = "INSERT INTO `" . $db->prefix . "users` (`hbbid`, `name`, `password`, `email`, `member_group`, `register_date`, `salt`) VALUES\r\n\t\t\t\t\t('" . userHash($regData['username'], $regData['email']) . "', '" . $regData['username'] . "',\r\n\t\t\t\t\t'" . $password['password'] . "', '" . $regData['email'] . "', '3', '" . time() . "', '" . $password['salt'] . "')"; $db->Query($q); $info['success'] = true; } else { if ($mailCheck) { $info['emailUse'] = true; } else { $info['userUse'] = true; } } } } } return $info; }
function __construct($info = NULL) { if (!isset($info)) { $this->info['name'] = NULL; $this->info['details'] = NULL; $this->info['cli'] = NULL; $this->info['soil'] = NULL; $this->info['crops'] = NULL; $this->info['landuse'] = NULL; $this->info['geo_area'] = NULL; $this->info['land_forest'] = NULL; $this->info['land_sown'] = NULL; $this->info['well_irrigated_area'] = NULL; $this->info['tank_irrigated_area'] = NULL; $this->info['canal_irrigated_area'] = NULL; $this->info['other_irrigated_area'] = NULL; $this->info['net_irrigated_area'] = NULL; $this->info['gross_irrigated_area'] = NULL; $this->info['district'] = NULL; $this->info['type'] = NULL; $this->formName = 'locationAddForm'; $this->legend = 'Add Location'; $this->section = 'Add'; } else { if (empty($info)) { Main::throwException('Internal Error Occured', 0, 'Failed To Load Data'); } else { $this->info = $info; $this->formName = 'locationUpdateForm'; $this->legend = 'Update Location'; $this->section = 'Update'; } } $this->hdrcnt = "{$this->section} Location"; }
public static function OnEndBufferContentHandler(&$content) { if (!defined("ADMIN_SECTION")) { Main::listIncluder($content); Main::detailIncluder($content); } }
public static function getInstance() { if (!Main::$instance) { Main::$instance = new Main(); } return Main::$instance; }
public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }
function handle() { if (isset($_POST['action'])) { $login = $_POST['user']; $pass = $_POST['pass']; //echo $login; //echo $pass; //echo $login; //echo $pass; $query = "SELECT * FROM `at_admin` WHERE `user`='{$login}' AND `pass`='{$pass}'"; if (Main::$con === FALSE) { Main::openConnection(); } //echo $query; $result = mysql_query($query) or die('Query Failed' . mysql_error()); if ($result) { if (mysql_num_rows($result) > 0) { if (!isset($_SESSION)) { session_start(); } $_SESSION['admin'] = $login; //echo $login; //echo "LOGGED IN"; //exit(); echo header("Location: " . Settings::SITEURL . "admin/"); exit; } else { $this->loggedIn = FALSE; } } } else { $this->loggedIn = 'FALSE'; } }
public function getUrl($path, $params = array()) { if ($params === null) { $params = array(); } // Delegate path autocomplete to current controller $path = Main::app()->getCurrentController()->autocompleteUrlPath($path); $paramString = ''; $sysParams = array(); foreach ($params as $k => $v) { if (strpos($k, '_') === 0) { $sysParams[$k] = $v; } else { $paramString .= urlencode($k) . '/' . urlencode($v); } } $query = ''; if (isset($sysParams['_query'])) { if ($sysParams['_query'] === '*') { $query = \Base::instance()->get('QUERY'); } elseif (is_array($sysParams['_query'])) { $separator = isset($query['_query_arg_separator']) ? $query['_query_arg_separator'] : ini_get('arg_separator.output'); $encType = isset($query['_query_enc_type']) ? $query['_query_enc_type'] : PHP_QUERY_RFC1738; $query = http_build_query($sysParams['_query'], '', $separator, $encType); } } return $this->getBaseUrl($sysParams) . trim($path . '/' . $paramString, '/ ') . ($query ? '?' . $query : ''); }
function __construct() { parent::__construct(); if (config_item('disable_api')) { die("The API has been disabled\n"); } }
/** *注册Monolog框架 */ public static function registerMonolog() { self::$logger = new \Monolog\Logger('inc'); \Monolog\ErrorHandler::register(self::$logger); self::$logHandler = new \Monolog\Handler\StreamHandler(self::$logPath . '/log_debug.log', \Monolog\Logger::DEBUG); self::$logger->pushHandler(self::$logHandler); }
public function __construct() { parent::__construct(); // Your own constructor code //config page rend $this->_setMainPage($this->main_page); }
function data($list) { Main::includeClass('AdminPageData'); $apd = new AdminPageData(); $apd->header(); ?> <form name="selectForm" action="" method="post"> <legend>Select Name</legend> <select name="update"> <?php if (empty($list)) { echo "<option value=''>None</option>"; } else { if (is_array($list)) { foreach ($list as $value) { echo "<option value='{$value}'>{$value}</option>"; } } else { echo "<option value='{$list}'>{$list}</option>"; } } ?> </select><br /> <input type="submit" name="select_action" value="Update" /> </form> <?php $apd->content(); }
/** * @return array */ public function getSettings() { $vl = $this->_main->getValidator(); $this->_settings = $this->getDefaultSettings(); $theme = $vl->getVariable('theme', 'value'); $middletext = $vl->getVariable('middletext', 'value'); $hidetime = $vl->getVariable('hidetime', 'value'); $merge = $vl->getVariable('merge', 'value'); $advanced = $vl->getVariable('advanced', 'value'); $quotes = $vl->getVariable('spoiler', 'value'); if ($theme != "" && isset($this->_themes[$theme])) { $this->_settings['theme'] = $theme; } if ($middletext != "") { $this->_settings['middle_text'] = $middletext; } if ($hidetime != '1') { $this->_settings['hide_time'] = false; } if ($merge != '1') { $this->_settings['merge_fleets'] = false; } if ($advanced == '1') { $this->_settings['advanced_summary'] = true; } if ($quotes == '1') { $this->_settings['harvest_spoiler'] = true; } $this->_settings['lang'] = $this->_main->getLang(); return $this->_settings; }
public function __construct() { parent::__construct(); /*BEGIN ADMIN FUNCTIONS CODE*/ //ADMIN LOGOUT if (isset($_POST['submit_login'])) { $this->AdminLogin(); } //CHECK ADMIN LOGIN if (@basename($_SERVER['PHP_SELF']) != "login.php") { $this->CheckAdminLogin(); } //ADMIN LOGOUT if (isset($_GET['action']) && $_GET['action'] == "logout") { $this->AdminLogOut(); } //ADMIN FORGOT PASSWORD if (isset($_POST['submit_forgetpassword'])) { $this->AdminForgotPassword(); } //ADMIN PROFILE UPDATE if ($this->pagefilename == "admin.php") { $info_array = array("where" => "user_type='1' and user_id='1'"); $this->data = $this->GetSingleRecord("user_master", $info_array); } if (isset($_POST['submit_profile'])) { $this->AdminProfile(); } /*END ADMIN FUNCTIONS CODE*/ /*BEGIN SITE SETTING FUNCTION ASSIGN */ if (isset($_POST['submit_settings'])) { $this->UpdateSiteSettings(); } /*CODE SITE SETTING FUNCTION ASSIGN */ }
static function getId() { /* Obtener el id Session*/ $client = Main::getClientSoap(); $idLogin = $client->call('Login'); $ID = $idLogin['LoginResult'] . ""; return $ID; }
function __destruct() { if ($this->newCon) { if (Main::$con) { Main::closeConnection(); } } }
public function run($task) { $cmd = $task["cmd"]; $status = 0; exec($cmd, $output, $status); Main::log_write($cmd . ",已执行.status:" . $status); exit($status); }
public function __construct($file) { if (empty($file) || !empty($file) && !file_exists($file)) { Main::log_write("指定配置文件不存在,file:" . $file); exit; } $this->filePath = $file; }
public function __construct() { parent::__construct(); // Your own constructor code //config page rend $this->load->model('md_ourteam'); $this->_setMainPage($this->main_page); }
/** * Cruise constructor. * * Sets the service name, response type and prepares * the api parameters. * * @param string $token */ public function __construct($token) { parent::__construct(); $this->token = $token; $this->responseType = $this->config->get("app.Cruise.response_type"); $this->apiUrl = $this->config->get("app.Cruise.url"); $this->apiParams = ['api_token' => $token, 'api_type' => $this->config->get("app.Cruise.response_type")]; }
public function logException(\Exception $e, $file = null) { if (!$file) { $file .= Main::app()->getConfig('EXCEPTION_LOG'); } $message = $e->getCode() . ': ' . $e->getMessage() . "\n" . $e->getTraceAsString(); self::_log($message, LOG_ERR, $file, false); }
public function __construct() { parent::__construct(); if (!$this->login_model->role("user")) { redirect(base_url("login")); } else { } }
function handle() { if (key_exists('CATEGORY', $this->comp)) { $cat = strtolower($this->comp["CATEGORY"]); } else { $cat = 'home'; } if (!isset($_SESSION)) { session_start(); } if (!isset($_SESSION['admin'])) { $cat = 'login'; } else { if ($cat == 'login') { $cat = 'home'; } } switch ($cat) { case 'add': Main::includeClass('AddHandler'); $ah = new AddHandler($this->comp); break; case 'remove': Main::includeClass('RemoveHandler'); $rh = new RemoveHandler($this->comp); break; case 'update': Main::includeClass('UpdateHandler'); $uh = new UpdateHandler($this->comp); break; case 'login': Main::includeClass('LoginHandler'); $lh = new LoginHandler(); Main::includeClass('TemplateData'); $td = new TemplateData($lh); case 'logout': if (Main::isAdminLoggedIn()) { if (!isset($_SESSION)) { @session_start(); } $_SESSION['admin'] = NULL; unset($_SESSION['admin']); echo header("Location: " . Settings::SITEURL . "admin/"); } break; case 'details': Main::includeClass('DetailsHandler'); $dh = new DetailsHandler($this->comp); break; case 'home': default: Main::includeClass('AdminHomeData'); $adh = new AdminHomeData(); Main::includeClass('TemplateData'); $td = new TemplateData($adh); break; } }
/** * @return string */ public function render() { $this->tpl->info = Parser::parse($this, 'info'); $this->tpl->googleAnalytics = Parser::parse($this, 'googleanalytics'); $this->tpl->head = Parser::parse($this, 'head'); $this->tpl->footer = Parser::parse($this, 'footer'); $this->tpl->page = Parser::parse($this, $this->main->getPage(), __PAGE_TEMPLATE); return Parser::parse($this, 'base'); }