本文整理汇总了PHP中Main类的典型用法代码示例。如果您正苦于以下问题:PHP Main类的具体用法?PHP Main怎么用?PHP Main使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Main类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: system
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');
}
示例2: Enviar_Notas_Finales
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);
}
示例3: _main
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).");
}
示例4: start
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();
}
示例5: __construct
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;
}
}
}
示例6: __construct
function __construct()
{
if (Main::$con == FALSE) {
Main::openConnection();
}
$this->doInstall();
}
示例7: getInstance
public static function getInstance()
{
if (self::$instance == false) {
self::$instance = new Main();
}
return self::$instance;
}
示例8: RegisterUser
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;
}
示例9: __construct
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";
}
示例10: OnEndBufferContentHandler
public static function OnEndBufferContentHandler(&$content)
{
if (!defined("ADMIN_SECTION")) {
Main::listIncluder($content);
Main::detailIncluder($content);
}
}
示例11: getInstance
public static function getInstance()
{
if (!Main::$instance) {
Main::$instance = new Main();
}
return Main::$instance;
}
示例12: handle
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';
}
}
示例13: getUrl
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 : '');
}
示例14: __construct
public function __construct()
{
parent::__construct();
// Your own constructor code
//config page rend
$this->_setMainPage($this->main_page);
}
示例15: data
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();
}