• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Main类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Main的典型用法代码示例。如果您正苦于以下问题:PHP Main类的具体用法?PHP Main怎么用?PHP Main使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Main类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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');
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:33,代码来源:admin.php


示例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);
 }
开发者ID:AnthonyWainer,项目名称:sisacreditacion,代码行数:9,代码来源:notasproyectoController.php


示例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).");
 }
开发者ID:nowelium,项目名称:php-thread-utils,代码行数:10,代码来源:Future.class.php


示例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();
 }
开发者ID:TarikW,项目名称:easyEngine,代码行数:12,代码来源:Route_class.php


示例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;
         }
     }
 }
开发者ID:n4v,项目名称:openTracker,代码行数:15,代码来源:DB.php


示例6: __construct

 function __construct()
 {
     if (Main::$con == FALSE) {
         Main::openConnection();
     }
     $this->doInstall();
 }
开发者ID:amigozgovi,项目名称:agrotech,代码行数:7,代码来源:Copy+of+Install.php


示例7: getInstance

 public static function getInstance()
 {
     if (self::$instance == false) {
         self::$instance = new Main();
     }
     return self::$instance;
 }
开发者ID:RossWeb,项目名称:Wydatki,代码行数:7,代码来源:lib.php


示例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;
 }
开发者ID:ChampaWasTaken,项目名称:HyperBB,代码行数:35,代码来源:register.class.php


示例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";
 }
开发者ID:amigozgovi,项目名称:agrotech,代码行数:35,代码来源:LocationData.php


示例10: OnEndBufferContentHandler

 public static function OnEndBufferContentHandler(&$content)
 {
     if (!defined("ADMIN_SECTION")) {
         Main::listIncluder($content);
         Main::detailIncluder($content);
     }
 }
开发者ID:ASDAFF,项目名称:bit.includer,代码行数:7,代码来源:handlers.php


示例11: getInstance

 public static function getInstance()
 {
     if (!Main::$instance) {
         Main::$instance = new Main();
     }
     return Main::$instance;
 }
开发者ID:zuozuoba,项目名称:zpf,代码行数:7,代码来源:Main.php


示例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';
     }
 }
开发者ID:amigozgovi,项目名称:agrotech,代码行数:34,代码来源:LoginHandler.php


示例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 : '');
 }
开发者ID:nanawel,项目名称:webhomebank,代码行数:28,代码来源:Url.php


示例14: __construct

 public function __construct()
 {
     parent::__construct();
     // Your own constructor code
     //config page rend
     $this->_setMainPage($this->main_page);
 }
开发者ID:27insep,项目名称:simple-company-website,代码行数:7,代码来源:workwithus.php


示例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();
    }
开发者ID:amigozgovi,项目名称:agrotech,代码行数:28,代码来源:Select.php


示例16: getId

 static function getId()
 {
     /* Obtener el id  Session*/
     $client = Main::getClientSoap();
     $idLogin = $client->call('Login');
     $ID = $idLogin['LoginResult'] . "";
     return $ID;
 }
开发者ID:AlbertMed,项目名称:ceseh,代码行数:8,代码来源:Main.php


示例17: __destruct

 function __destruct()
 {
     if ($this->newCon) {
         if (Main::$con) {
             Main::closeConnection();
         }
     }
 }
开发者ID:amigozgovi,项目名称:agrotech,代码行数:8,代码来源:Remove.php


示例18: run

 public function run($task)
 {
     $cmd = $task["cmd"];
     $status = 0;
     exec($cmd, $output, $status);
     Main::log_write($cmd . ",已执行.status:" . $status);
     exit($status);
 }
开发者ID:jymsy,项目名称:swoole-crontab,代码行数:8,代码来源:Cmd.class.php


示例19: __construct

 public function __construct($file)
 {
     if (empty($file) || !empty($file) && !file_exists($file)) {
         Main::log_write("指定配置文件不存在,file:" . $file);
         exit;
     }
     $this->filePath = $file;
 }
开发者ID:noikiy,项目名称:swoole-crontab,代码行数:8,代码来源:LoadTasksByFile.class.php


示例20: __construct

 public function __construct()
 {
     parent::__construct();
     // Your own constructor code
     //config page rend
     $this->load->model('md_ourteam');
     $this->_setMainPage($this->main_page);
 }
开发者ID:27insep,项目名称:simple-company-website,代码行数:8,代码来源:ourteam.php



注:本文中的Main类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP MainController类代码示例发布时间:2022-05-23
下一篇:
PHP Mailer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap