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

PHP if_demo_throw_exception函数代码示例

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

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



在下文中一共展示了if_demo_throw_exception函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: updateSwitchProgram

 function updateSwitchProgram($param)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if_demo_throw_exception('switchprog');
     $this->web_driver = $gbl->getSyncClass($this->__masterserver, $this->nname, 'web');
     $this->dns_driver = $gbl->getSyncClass($this->__masterserver, $this->nname, 'dns');
     $this->spam_driver = $gbl->getSyncClass($this->__masterserver, $this->nname, 'spam');
     $a['web'] = $this->web_driver;
     $a['dns'] = $this->dns_driver;
     $a['spam'] = $this->spam_driver;
     foreach ($param as $k => $v) {
         if ($this->{$k} === $v) {
             dprint("No change for {$k}: {$v}\n");
         } else {
             $class = strtilfirst($k, "_");
             $drstring = "{$class}_driver";
             rl_exec_get(null, $this->nname, array($class, 'switchDriver'), array($class, $this->{$drstring}, $v));
             changeDriver($this->nname, $class, $v);
             $fixc = $class;
             if ($class === 'spam') {
                 $fixc = "mmail";
             }
             lxshell_return("__path_php_path", "../bin/fix/fix{$fixc}.php", "--server={$this->nname}");
             $a[$class] = $v;
             rl_exec_get(null, $this->nname, 'slave_save_db', array('driver', $a));
         }
     }
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:28,代码来源:pserverlib.php


示例2: dbactionUpdate

 function dbactionUpdate($subaction)
 {
     if_demo_throw_exception('lxguard');
     $rmt = new Remote();
     $rmt->data['disablehit'] = $this->main->disablehit;
     lfile_put_serialize("__path_home_root/lxguard/config.info", $rmt);
     lxshell_return("__path_php_path", "../bin/common/lxguard.php");
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:8,代码来源:lxguard__synclib.php


示例3: updateLxupdateInfo

 function updateLxupdateInfo()
 {
     if_demo_throw_exception();
     if (isUpdating()) {
         throw new lxException("program_is_already_updating");
     } else {
         rl_exec_get($this->__masterserver, 'localhost', array('lxupdate', 'execUpdate'), null);
         throw new lxException("update_scheduled");
     }
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:10,代码来源:lxupdatelib.php


示例4: updateRemove

 function updateRemove($param)
 {
     if_demo_throw_exception();
     $server = $this->syncserver;
     $sq = new Sqlite(null, "lxguardhit");
     foreach ($param['_accountselect'] as $ip) {
         $sq->rawQuery("delete from lxguardhit where syncserver = '{$server}' AND ipaddress = '{$ip}'");
     }
     self::save_current_hitlist($server);
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:10,代码来源:lxguardlib.php


示例5: shellModify

 function shellModify()
 {
     global $gbl, $sgbl, $login, $ghtml;
     if_demo_throw_exception();
     $shell = fix_disabled($this->main->shell, $sgbl->__var_noaccess_shell);
     lxshell_return("usermod", "-s", $shell, $this->main->nname);
     if ($this->main->isOn('disable_system_flag')) {
         lxshell_return("usermod", "-L", $this->main->nname);
     } else {
         lxshell_return("usermod", "-U", $this->main->nname);
     }
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:12,代码来源:client__synclib.php


示例6: addform

 static function addform($parent, $class, $typetd = null)
 {
     if_demo_throw_exception('short');
     $vlist['sortid'] = null;
     if ($typetd['val'] !== 'separator') {
         $vlist['url'] = null;
         $vlist['description'] = null;
         $vlist['external'] = array('h', 'on');
     }
     $ret['variable'] = $vlist;
     $ret['action'] = 'add';
     return $ret;
 }
开发者ID:digideskio,项目名称:hypervm,代码行数:13,代码来源:dskfavorite.php


示例7: writeAuthorizedKey

 function writeAuthorizedKey($key)
 {
     if_demo_throw_exception('sshkey');
     $username = $this->main->username;
     $p = os_get_home_dir($username);
     if (!$p) {
         return;
     }
     lxuser_mkdir($username, "{$p}/.ssh");
     $f = "{$p}/.ssh/authorized_keys";
     lxuser_put_contents($username, $f, $key);
     lxuser_chmod($username, "{$p}/.ssh", "0700");
     lxuser_chmod($username, $f, "0700");
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:14,代码来源:sshauthorizedkey__sync.php


示例8: deleteSpecific

 function deleteSpecific()
 {
     if_demo_throw_exception('demo');
     $sq = new Sqlite(null, 'ipaddress');
     $sq->rawQuery("delete from ipaddress where syncserver = '{$this->nname}'");
     //$this->fixDatabaseServers();
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:7,代码来源:pservercorelib.php


示例9: updatePassword

 function updatePassword($param)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if_demo_throw_exception('lxclient');
     if ($this->isLogin() || $this->is__table('auxiliary') && $this->getParentO()->isAuxiliary()) {
         if (!check_password($param['old_password_f'], $this->password)) {
             throw new lxException("Wrong+Password", 'old_password_f');
         }
         unset($param['old_password_f']);
     }
     $this->__old_password = $this->password;
     $param['realpass'] = $param['password'];
     $param['password'] = crypt($param['password']);
     // Hack hack... this is due the forced security password change in the admin. Most likely the referal url, to which it is redirected, is empty. So if you are changing the login password, you can anyway redirect to 'show';
     if ($this->isLogin()) {
         $gbl->__this_redirect = '/display.php?frm_action=show';
     }
     return $param;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:19,代码来源:lxclient.php


示例10: updateInformation

 function updateInformation($param)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if_demo_throw_exception('info');
     if (isset($param['cttype'])) {
         if (!$this->isAdmin()) {
             if ($this->getParentO()->isGt($param['cttype'])) {
                 throw new lxException("parent_doesnt_have_privileges", 'cttype', '');
             }
         }
     }
     if ($login->isAdmin()) {
         $gen = $login->getObject('general');
         $gen->disable_admin = $param['disable_admin'];
         if ($gen->isOn('disable_admin')) {
             $list = $login->getList('auxiliary');
             if (count($list) == 0) {
                 throw new lxException("you_should_create_auxiliary_id_before_disabling_admin", '', '');
             }
         }
         $gen->setUpdateSubaction();
         $gen->write();
     }
     return $param;
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:25,代码来源:clientcorelib.php


示例11: syncCreateConf

 function syncCreateConf()
 {
     global $gbl, $sgbl, $login, $ghtml;
     global $global_shell_error;
     if_demo_throw_exception('cron');
     $conf_file = "__path_cron_root/{$this->main->username}";
     $list = array('minute', 'hour', 'weekday', 'ddate', 'month');
     $tfile = lx_tmp_file($conf_file);
     $cmd = null;
     if ($this->main->__var_mailto) {
         $cmd .= "MAILTO={$this->main->__var_mailto}\n";
     }
     $result = $this->main->__var_cron_list;
     foreach ($result as &$__r) {
         foreach ($list as $l) {
             $__r[$l] = unserialize(base64_decode($__r["ser_{$l}"]));
         }
     }
     $result = merge_array_object_not_deleted($result, $this->main);
     //dprintr($result);
     foreach ((array) $result as $v) {
         if ($v['ttype'] === 'simple') {
             $v['weekday'] = array('--all--');
             $v['month'] = array('--all--');
             $v['ddate'] = array('--all--');
             if ($v['simple_cron'] === 'every-day') {
                 $v['hour'] = $v['cron_day_hour'];
                 $v['minute'] = 0;
             }
             if ($v['simple_cron'] === 'every-hour') {
                 $v['hour'] = array('--all--');
                 $v['minute'] = 0;
             }
             if ($v['simple_cron'] === 'every-minute') {
                 $v['hour'] = array('--all--');
                 $v['minute'] = array('--all--');
             }
         } else {
             foreach ($v["weekday"] as &$___tq) {
                 if (is_numeric($___tq)) {
                     $___tq -= 1;
                 }
             }
         }
         foreach ($list as $l) {
             $v[$l] = $this->getCronString($v[$l]);
         }
         if (!$v['minute']) {
             $v['minute'] = 0;
         }
         $cmd .= implode("\t", array($v['minute'], $v['hour'], $v['ddate'], $v['month'], $v['weekday'], $v['command']));
         $cmd .= "\n";
     }
     lfile_put_contents($tfile, $cmd);
     if (!posix_getpwnam($this->main->username)) {
         lxfile_rm("/var/spool/cron/{$this->main->username}");
         return;
     }
     $ret = lxshell_return("crontab", "-u", $this->main->username, $tfile);
     if ($ret) {
         // Why exactly was a throw removed? backup/restore?
         //throw new lxException("adding_cron_failed", "", $global_shell_error);
         $gbl->setWarning('adding_cron_failed', '', $global_shell_error);
         $data = lfile_get_contents($tfile);
         log_log("cron_error", $data);
     }
     lunlink($tfile);
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:68,代码来源:cron__linuxlib.php


示例12: dbactionUpdate

 function dbactionUpdate($subaction)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if_demo_throw_exception('ffile');
     $this->aux = new Ffile__common(null, null, $this->nname);
     $this->aux->main = $this->main;
     if ($this->main->isOn('readonly')) {
         throw new lxexception('file_manager_is_readonly', '');
     }
     $chownug = "{$this->main->__username_o}:{$this->main->__username_o}";
     switch ($subaction) {
         case "fancyedit":
         case "edit":
             lxuser_put_contents($chownug, $this->main->getFullPath(), $this->main->content);
             lxuser_return($chownug, "dos2unix", $this->main->getFullPath());
             lxuser_chmod($chownug, $this->main->getFullPath(), "0644");
             break;
         case "upload_s":
             $filename = $this->aux->uploadDirect();
             lxuser_chmod($chownug, $filename, "0644");
             lxfile_generic_chown($filename, $chownug);
             break;
         case "rename":
             $this->aux->reName();
             break;
         case "paste":
             $this->aux->filePaste();
             break;
         case "perm":
             $arg = null;
             $perm = $this->main->newperm;
             $perm = 0 . $perm;
             if ($this->main->isOn('recursive_f')) {
                 new_process_chmod_rec($this->main->__username_o, $this->main->fullpath, $perm);
             } else {
                 lxfile_unix_chmod($this->main->fullpath, "{$perm}");
             }
             break;
         case "newdir":
             $path = $this->aux->newDir();
             lxfile_unix_chown($path, $chownug);
             break;
         case "content":
             if ($this->main->is_image()) {
                 $this->aux->resizeImage();
             } else {
                 throw new lxexception('cannot_save_content', '');
             }
             break;
         case "thumbnail":
             $this->aux->createThumbnail();
             break;
         case "convert_image":
             $this->aux->convertImage();
             break;
         case "zip_file":
             $zipfile = $this->aux->zipFile();
             break;
         case "filedelete":
             $this->aux->moveAllToTrash();
             break;
         case "filerealdelete":
             $this->aux->fileRealDelete();
             break;
         case "restore_trash":
             $this->aux->restoreTrash();
             break;
         case "clear_trash":
             $this->aux->clearTrash();
             break;
         case "download_from_http":
             $fullpath = $this->aux->downloadFromHttp();
             lxfile_unix_chown($fullpath, $chownug);
             break;
         case "download_from_ftp":
             $fullpath = $this->aux->downloadFromFtp();
             lxfile_unix_chown($fullpath, $chownug);
             break;
         case "zipextract":
             $dir = $this->aux->zipExtract();
             break;
     }
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:83,代码来源:ffile__linuxlib.php


示例13: updateDisable

 function updateDisable($param, $reason = null)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if ($this->isAdmin()) {
         return;
     }
     if_demo_throw_exception();
     if (!$reason) {
         $reason = "__type:{$login->nname}:{$login->cttype}";
     }
     if (isset($this->status) && $this->status === 'on') {
         $this->disable_reason = $reason;
         $this->setStatus('off');
     }
     return null;
 }
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:16,代码来源:lxclass.php


示例14: postUpdate

 function postUpdate()
 {
     // The lxclient postupdate which checks for change of skin...
     if ($this->subaction === 'createtemplate') {
         if ($this->isXen()) {
             $stem = explode("-", $this->ostemplate);
             if ($this->isWindows()) {
                 $name = "{$stem[0]}-";
             } else {
                 $name = "{$stem[0]}-{$stem[1]}-{$stem[2]}-";
             }
             $templatename = "{$name}{$this->newostemplate_name_f}";
             if ($this->isWindows()) {
                 $tempfpath = "__path_program_home/xen/template/{$templatename}.img";
             } else {
                 $tempfpath = "__path_program_home/xen/template/{$templatename}.tar.gz";
             }
             if (lxfile_exists($tempfpath)) {
                 throw new lxException("template_already_exists");
             }
         } else {
             $stem = explode("-", $this->ostemplate);
             $name = "{$stem[0]}-{$stem[1]}-{$stem[2]}-";
             $templatename = "{$name}{$this->newostemplate_name_f}";
             if (lxfile_exists("/vz/template/cache/{$templatename}.tar.gz")) {
                 throw new lxException("template_already_exists");
             }
         }
     }
     if ($this->subaction === 'rebuild' || $this->subaction === 'installkloxo') {
         if_demo_throw_exception();
         $this->setUpOsTemplateDownloadParam();
     }
     parent::postUpdate();
 }
开发者ID:digideskio,项目名称:hypervm,代码行数:35,代码来源:vpslib.php


示例15: isSync

 function isSync()
 {
     if_demo_throw_exception('ip');
     return false;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:5,代码来源:allowediplib.php


示例16: dbactionUpdate

 function dbactionUpdate($subaction)
 {
     if_demo_throw_exception('ffile');
     if ($this->main->isOn('readonly')) {
         throw new lxexception('file_manager_is_readonly', '');
     }
     switch ($subaction) {
         case "edit":
             lfile_put_contents($this->main->getFullPath(), $this->main->content);
             break;
         case "upload":
             $filename = $this->main->getFullPath() . "/{$this->main->upload_file_name}";
             dprintr($this->main->upload_overwrite_f);
             if (!$this->main->isOn('upload_overwrite_f')) {
                 if (lfile_exists($filename)) {
                     throw new lxexception('file_exists_upload', 'upload_name_f');
                 }
             }
             getFromFileserv($this->main->__var_upload_tmp_server, $this->main->__var_upload_filepass, $filename);
             break;
         case "rename":
             $directory = dirname($this->main->fullpath);
             $new = $directory . "/" . $this->main->newname;
             if (lfile_exists($new)) {
                 throw new lxexception('file_exists_rename', '');
             }
             lxfile_mv_rec($this->main->fullpath, $new);
             //lxfile_unix_chown($new, $this->main->__username_o);
             break;
         case "paste":
             if ($this->main->paste_list) {
                 // Hack... SPecifically checking for pasteaction. Should just use it directly in the command.
                 $arglist[] = $this->main->__username_o;
                 foreach ($this->main->paste_list as &$_tl) {
                     $_tl = $this->main->root . $_tl;
                 }
                 //$arglist = array_merge($arglist, $this->main->paste_list);
                 $arglist[] = $this->main->paste_list;
                 $arglist[] = $this->main->fullpath;
                 if ($this->main->pasteaction === 'copy') {
                     foreach ($this->main->paste_list as $p) {
                         lxfile_cp_rec($p, $this->main->fullpath);
                     }
                 } else {
                     foreach ($this->main->paste_list as $p) {
                         lxfile_mv_rec($p, $this->main->fullpath);
                     }
                 }
                 //lxfile_unix_chown_rec($this->main->fullpath, $this->main->__username_o);
             }
             break;
         case "perm":
             throw new lxexception('no_perm_setting', '');
             break;
         case "newdir":
             $i = 1;
             $rpath = $this->main->fullpath;
             $name = "/" . $this->main->newfolder_f;
             $path = $rpath . $name;
             if (lxfile_exists($path)) {
                 throw new lxexception('file_exists', '');
             }
             lxfile_mkdir($path);
             break;
         case "zip_file":
             foreach ($this->main->zip_file_list as &$_t_f) {
                 $_t_f = coreFfile::removeLeadingSlash($_t_f);
                 $_t_f = basename($_t_f);
                 $_t_f = "\"{$_t_f}\"";
             }
             $list = implode(" ", $this->main->zip_file_list);
             $oldir = getcwd();
             $fullpath = expand_real_root($this->main->fullpath);
             do_exec_system($this->main->__username_o, $fullpath, "c:/Progra~1/7-Zip/7z a NewArchive.zip {$list}", $out, $err, $ret, null);
             break;
         case "filedelete":
             foreach ($this->main->filedelete_list as $f) {
                 ffile__common::moveToTrash($this->main->root, $f);
             }
             break;
         case "restore_trash":
             foreach ($this->main->restore_trash_list as $f) {
                 ffile__common::restoreFromTrash($this->main->root, $f);
             }
             break;
         case "clear_trash":
             foreach ($this->main->clear_trash_list as $f) {
                 ffile__common::clearFromTrash($this->main->root, $f);
             }
             break;
         case "zipextract":
             $fulzippath = $this->main->root . $this->main->zip_extract_dir_f;
             if (!lxfile_exists(null, $fulzippath)) {
                 lxfile_mkdir($fulzippath);
             } else {
                 $zipdir = new Ffile("localhost", "localhost", $this->main->root, $this->main->zip_extract_dir_f, $this->main->__username_o);
                 $zipdir->get();
                 if (!$zipdir->is_dir()) {
                     throw new lxexception("file_exists_but_not_dir", 'unzippath', $this->main->zip_extract_dir_f);
                 }
//.........这里部分代码省略.........
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:101,代码来源:ffile__windowslib.php


示例17: updatePortConfig

 function updatePortConfig($param)
 {
     if_demo_throw_exception('port');
     return $param;
 }
开发者ID:zseand,项目名称:kloxo,代码行数:5,代码来源:generallib.php


示例18: dbactionUpdate

 function dbactionUpdate($subaction)
 {
     if_demo_throw_exception('ps');
     lxshell_return("kill", "-" . $this->main->signal, $this->main->nname);
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:5,代码来源:process__linuxlib.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP if_group函数代码示例发布时间:2022-05-15
下一篇:
PHP if_demo函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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