当前位置: 首页>>代码示例>>PHP>>正文


PHP inserttask函数代码示例

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


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

示例1: storeSettingDefaultIp

/**
 * This file is part of the SysCP project.
 * Copyright (c) 2003-2009 the SysCP Team (see authors).
 *
 * For the full copyright and license information, please view the COPYING
 * file that was distributed with this source code. You can also view the
 * COPYING file online at http://files.syscp.org/misc/COPYING.txt
 *
 * @copyright  (c) the authors
 * @author     Florian Lippert <flo@syscp.org>
 * @license    GPLv2 http://files.syscp.org/misc/COPYING.txt
 * @package    Functions
 * @version    $Id$
 */
function storeSettingDefaultIp($fieldname, $fielddata, $newfieldvalue)
{
    $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue);
    if ($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'defaultip') {
        global $db;
        $customerstddomains_result = $db->query('SELECT `standardsubdomain` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain` <> \'0\'');
        $ids = array();
        while ($customerstddomains_row = $db->fetch_array($customerstddomains_result)) {
            $ids[] = (int) $customerstddomains_row['standardsubdomain'];
        }
        if (count($ids) > 0) {
            $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `ipandport`=\'' . (int) $newfieldvalue . '\' WHERE `id` IN (\'' . implode('\',\'', $ids) . '\') AND `ipandport` = \'' . $db->escape(getSetting('system', 'defaultip')) . '\'');
        }
        inserttask('1');
    }
    return $returnvalue;
}
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:31,代码来源:function.storeSettingDefaultIp.php

示例2: storeSettingHostname

/**
 * This file is part of the SysCP project.
 * Copyright (c) 2003-2009 the SysCP Team (see authors).
 *
 * For the full copyright and license information, please view the COPYING
 * file that was distributed with this source code. You can also view the
 * COPYING file online at http://files.syscp.org/misc/COPYING.txt
 *
 * @copyright  (c) the authors
 * @author     Florian Lippert <flo@syscp.org>
 * @license    GPLv2 http://files.syscp.org/misc/COPYING.txt
 * @package    Functions
 * @version    $Id$
 */
function storeSettingHostname($fieldname, $fielddata, $newfieldvalue)
{
    $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue);
    if ($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'hostname') {
        global $db, $idna_convert;
        $newfieldvalue = $idna_convert->encode($newfieldvalue);
        $customerstddomains_result = $db->query('SELECT `standardsubdomain` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain` <> \'0\'');
        $ids = array();
        while ($customerstddomains_row = $db->fetch_array($customerstddomains_result)) {
            $ids[] = (int) $customerstddomains_row['standardsubdomain'];
        }
        if (count($ids) > 0) {
            $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `domain` = REPLACE(`domain`, \'' . $db->escape(getSetting('system', 'hostname')) . '\', \'' . $db->escape($newfieldvalue) . '\') WHERE `id` IN (\'' . implode('\',\'', $ids) . '\')');
            inserttask('1');
        }
    }
    return $returnvalue;
}
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:32,代码来源:function.storeSettingHostname.php

示例3: savePHPSettings

function savePHPSettings($panel_domain_id, $customer_id, $settings)
{
    global $db;
    $result = $db->query_first("SELECT `special_phpsettings` FROM `" . TABLE_PANEL_DOMAINS . "`\n        WHERE id = '" . $panel_domain_id . "'");
    $php_settings = "";
    foreach ($settings as $key => $value) {
        if ($value == "disabled") {
            continue;
        }
        if (strstr($key, "zend_extension") !== false) {
            $key = "zend_extension";
        }
        // Check restrictions before saving ...
        if (checkNitradoServiceLimit($customer_id, 'php', $key, $value)) {
            $php_settings .= "{$key} = {$value}\n";
        }
    }
    $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET\n       `special_phpsettings` = '" . $db->escape($php_settings) . "'\n        WHERE id = '" . $panel_domain_id . "'");
    inserttask('1');
    inserttask('5');
    inserttask('9');
    inserttask('10');
    return $php_settings;
}
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:24,代码来源:function.savePHPSettings.php

示例4: inserttask

 $_update_data['mod_fcgid_starter'] = $mod_fcgid_starter;
 $_update_data['mod_fcgid_maxrequests'] = $mod_fcgid_maxrequests;
 $_update_data['parentdomainid'] = $id;
 // if we have no more ssl-ip's for this domain,
 // all its subdomains must have "ssl-redirect = 0"
 $update_sslredirect = '';
 if (count($ssl_ipandports) == 1 && $ssl_ipandports[0] == -1) {
     $update_sslredirect = ", `ssl_redirect` = '0' ";
 }
 $_update_stmt = Database::prepare("\n\t\t\t\t\tUPDATE `" . TABLE_PANEL_DOMAINS . "` SET\n\t\t\t\t\t`customerid` = :customerid,\n\t\t\t\t\t`adminid` = :adminid,\n\t\t\t\t\t`openbasedir` = :openbasedir,\n\t\t\t\t\t`phpsettingid` = :phpsettingid,\n\t\t\t\t\t`mod_fcgid_starter` = :mod_fcgid_starter,\n\t\t\t\t\t`mod_fcgid_maxrequests` = :mod_fcgid_maxrequests\n\t\t\t\t\t" . $upd_specialsettings . $updatechildren . $update_sslredirect . "\n\t\t\t\t\tWHERE `parentdomainid` = :parentdomainid\n\t\t\t\t");
 Database::pexecute($_update_stmt, $_update_data);
 // FIXME check how many we got and if the amount of assigned IP's
 // has changed so we can insert a config-rebuild task if only
 // the ip's of this domain were changed
 // -> for now, always insert a rebuild-task
 inserttask('1');
 // Cleanup domain <-> ip mapping
 $del_stmt = Database::prepare("\n\t\t\t\t\tDELETE FROM `" . TABLE_DOMAINTOIP . "` WHERE `id_domain` = :id\n\t\t\t\t");
 Database::pexecute($del_stmt, array('id' => $id));
 $ins_stmt = Database::prepare("\n\t\t\t\t\tINSERT INTO `" . TABLE_DOMAINTOIP . "` SET `id_domain` = :domainid, `id_ipandports` = :ipportid\n\t\t\t\t");
 foreach ($ipandports as $ipportid) {
     Database::pexecute($ins_stmt, array('domainid' => $id, 'ipportid' => $ipportid));
 }
 foreach ($ssl_ipandports as $ssl_ipportid) {
     if ($ssl_ipportid > 0) {
         Database::pexecute($ins_stmt, array('domainid' => $id, 'ipportid' => $ssl_ipportid));
     }
 }
 // Cleanup domain <-> ip mapping for subdomains
 $domainidsresult_stmt = Database::prepare("\n\t\t\t\t\tSELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid` = :id\n\t\t\t\t");
 Database::pexecute($domainidsresult_stmt, array('id' => $id));
开发者ID:mowamed,项目名称:Froxlor,代码行数:31,代码来源:admin_domains.php

示例5: standard_error

             if (!empty($username_check) && ($username_check['username'] = $username)) {
                 standard_error('usernamealreadyexists', $username);
             } elseif ($password == '') {
                 standard_error(array('stringisempty', 'mypassword'));
             } elseif ($path == '') {
                 standard_error('patherror');
             } else {
                 $userpath = makeCorrectDir($path);
                 $path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
                 $db->query('INSERT INTO `' . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int) $userinfo['customerid'] . "', '" . $db->escape($username) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($path) . "', 'y', '" . (int) $userinfo['guid'] . "', '" . (int) $userinfo['guid'] . "')");
                 $db->query('UPDATE `' . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int) $userinfo['guid'] . "'");
                 //						$db->query("INSERT INTO `".TABLE_FTP_GROUPS."` (`customerid`, `groupname`, `gid`, `members`) VALUES ('".$userinfo['customerid']."', '$username', '$uid', '$username')");
                 $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int) $userinfo['customerid'] . "'");
                 //						$db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value`='$uid' WHERE settinggroup='ftp' AND varname='lastguid'");
                 $log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . ' (' . $path . ")'");
                 inserttask(5);
                 redirectTo($filename, array('page' => $page, 's' => $s));
             }
         } else {
             $pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
             if ($settings['customer']['ftpatdomain'] == '1') {
                 $domains = '';
                 $result_domains = $db->query('SELECT `domain` FROM `' . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int) $userinfo['customerid'] . "'");
                 while ($row_domain = $db->fetch_array($result_domains)) {
                     $domains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
                 }
             }
             eval('echo "' . getTemplate('ftp/accounts_add') . '";');
         }
     }
 } elseif ($action == 'edit' && $id != 0) {
开发者ID:markc,项目名称:syscp,代码行数:31,代码来源:customer_ftp.php

示例6: showUpdateStep

    showUpdateStep("Enhancing tasks-table");
    Database::query("ALTER TABLE `" . TABLE_PANEL_TASKS . "` MODIFY `data` text NOT NULL default ''");
    lastStepStatus(0);
    updateToVersion('0.9.32-rc1');
}
if (isFroxlorVersion('0.9.32-rc1')) {
    showUpdateStep("Updating from 0.9.32-rc1 to 0.9.32-rc2", false);
    showUpdateStep("Removing autoresponder-cronjob (deprecated)");
    Database::query("DELETE FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `module` = 'froxlor/autoresponder';");
    lastStepStatus(0);
    showUpdateStep("Adding new settings for cron");
    // get user-chosen value
    $croncmdline = isset($_POST['croncmdline']) ? $_POST['croncmdline'] : "/usr/bin/nice -n 5 /usr/bin/php5 -q";
    Settings::AddNew("system.croncmdline", $croncmdline);
    // add task to generate cron.d-file
    inserttask('99');
    // silenty add the auto-update setting - we do not want everybody to know and use this
    // as it is a very dangerous setting
    Settings::AddNew("system.cron_allowautoupdate", 0);
    lastStepStatus(0);
    showUpdateStep("Removing backup-module ftp-users (deprecated)");
    Database::query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `username` LIKE '%_backup';");
    lastStepStatus(0);
    updateToVersion('0.9.32-rc2');
}
if (isFroxlorVersion('0.9.32-rc2')) {
    showUpdateStep("Updating from 0.9.32-rc2 to 0.9.32-rc3", false);
    showUpdateStep("Removing outdated languages");
    Database::query("DELETE FROM `" . TABLE_PANEL_LANGUAGE . "` WHERE `iso` REGEXP '(bg|ca|cz|da|hu|pl|ru|sk|es|zh)';");
    Database::query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `def_language` = 'English' WHERE `def_language` NOT REGEXP '(Dutch|English|Français|Deutsch|Italian|Portugu\\&ecirc;s|Swedish)';");
    Database::query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `def_language` = 'English' WHERE `def_language` NOT REGEXP '(Dutch|English|Français|Deutsch|Italian|Portugu&ecirc;s|Swedish)';");
开发者ID:cobrafast,项目名称:Froxlor,代码行数:31,代码来源:update_0.9.inc.php

示例7: elseif

            }
        }
    } elseif ($action == 'delete' && $id != 0) {
        $result = $db->query_first("SELECT `v`.`id`, `v`.`email`, `v`.`email_full`, `v`.`iscatchall`, `v`.`destination`, `v`.`customerid`, `v`.`popaccountid`, `u`.`quota` FROM `" . TABLE_MAIL_VIRTUAL . "` `v` LEFT JOIN `" . TABLE_MAIL_USERS . "` `u` ON(`v`.`popaccountid` = `u`.`id`)WHERE `v`.`customerid`='" . (int) $userinfo['customerid'] . "' AND `v`.`id`='" . (int) $id . "'");
        if (isset($result['popaccountid']) && $result['popaccountid'] != '') {
            if (isset($_POST['send']) && $_POST['send'] == 'send') {
                $db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int) $userinfo['customerid'] . "' AND `id`='" . (int) $result['popaccountid'] . "'");
                $result['destination'] = str_replace($result['email_full'], '', $result['destination']);
                $db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `destination` = '" . $db->escape(makeCorrectDestination($result['destination'])) . "', `popaccountid` = '0' WHERE `customerid`='" . (int) $userinfo['customerid'] . "' AND `id`='" . (int) $id . "'");
                if ($settings['system']['mail_quota_enabled'] == '1' && $userinfo['email_quota'] != '-1') {
                    $quota = (int) $result['quota'];
                } else {
                    $quota = 0;
                }
                if (isset($_POST['delete_userfiles']) && (int) $_POST['delete_userfiles'] == 1) {
                    inserttask('7', $userinfo['loginname'], $result['email_full']);
                }
                $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_accounts_used` = `email_accounts_used` - 1, `email_quota_used` = `email_quota_used` - " . (int) $quota . " WHERE `customerid`='" . (int) $userinfo['customerid'] . "'");
                $log->logAction(USR_ACTION, LOG_INFO, "deleted email account for '" . $result['email_full'] . "'");
                redirectTo($filename, array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
            } else {
                ask_yesno_withcheckbox('email_reallydelete_account', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
            }
        }
    }
} elseif ($page == 'forwarders') {
    if ($action == 'add' && $id != 0) {
        if ($userinfo['email_forwarders_used'] < $userinfo['email_forwarders'] || $userinfo['email_forwarders'] == '-1') {
            $result = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid`, `popaccountid`, `domainid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int) $userinfo['customerid'] . "' AND `id`='" . (int) $id . "'");
            if (isset($result['email']) && $result['email'] != '') {
                if (isset($_POST['send']) && $_POST['send'] == 'send') {
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:customer_email.php

示例8: eval

            eval("\$settings_page .= \"" . getTemplate("settings/settings") . "\";");
        }
        eval("echo \"" . getTemplate("settings/settings_form_begin") . "\";");
        eval("echo \$settings_page;");
        eval("echo \"" . getTemplate("settings/settings_form_end") . "\";");
    }
} elseif ($page == 'rebuildconfigs' && $userinfo['change_serversettings'] == '1') {
    if (isset($_POST['send']) && $_POST['send'] == 'send') {
        $log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
        inserttask('1');
        inserttask('5');
        inserttask('9');
        inserttask('10');
        # Using nameserver, insert a task which rebuilds the server config
        if ($settings['system']['bind_enable']) {
            inserttask('4');
        }
        standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
    } else {
        ask_yesno('admin_configs_reallyrebuild', $filename, array('page' => $page));
    }
} elseif ($page == 'updatecounters' && $userinfo['change_serversettings'] == '1') {
    if (isset($_POST['send']) && $_POST['send'] == 'send') {
        $log->logAction(ADM_ACTION, LOG_INFO, "updated resource-counters");
        $updatecounters = updateCounters(true);
        $customers = '';
        foreach ($updatecounters['customers'] as $customerid => $customer) {
            eval("\$customers.=\"" . getTemplate("settings/updatecounters_row_customer") . "\";");
        }
        $admins = '';
        foreach ($updatecounters['admins'] as $adminid => $admin) {
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:admin_settings.php

示例9: lescript

        try {
            // Initialize Lescript with documentroot
            $le = new lescript($cronlog);
            // Initialize Lescript
            $le->initAccount($certrow);
            // Request the new certificate (old key may be used)
            $return = $le->signDomains($domains, $certrow['ssl_key_file'], $certrow['ssl_csr_file']);
            // We are interessted in the expirationdate
            $newcert = openssl_x509_parse($return['crt']);
            // Store the new data
            Database::pexecute($updcert_stmt, array('id' => $certrow['id'], 'domainid' => $certrow['domainid'], 'crt' => $return['crt'], 'key' => $return['key'], 'ca' => $return['chain'], 'chain' => $return['chain'], 'csr' => $return['csr'], 'expirationdate' => date('Y-m-d H:i:s', $newcert['validTo_time_t'])));
            if ($certrow['ssl_redirect'] == 3) {
                Database::pexecute($upddom_stmt, array('domainid' => $certrow['domainid']));
            }
            $cronlog->logAction(CRON_ACTION, LOG_INFO, "Updated Let's Encrypt certificate for " . $certrow['domain']);
            $changedetected = 1;
        } catch (Exception $e) {
            $cronlog->logAction(CRON_ACTION, LOG_ERR, "Could not get Let's Encrypt certificate for " . $certrow['domain'] . ": " . $e->getMessage());
        }
    } else {
        $cronlog->logAction(CRON_ACTION, LOG_WARNING, "Skipping Let's Encrypt generation for " . $certrow['domain'] . " due to an enabled ssl_redirect");
    }
}
// If we have a change in a certificate, we need to update the webserver - configs
// This is easiest done by just creating a new task ;)
if ($changedetected) {
    inserttask(1);
}
// reset logger
$cronlog = FroxlorLogger::getInstanceOf(array('loginname' => 'cronjob'));
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Let's Encrypt certificates have been updated");
开发者ID:asemen,项目名称:Froxlor,代码行数:31,代码来源:cron_letsencrypt.php

示例10: array

 }
 // Disable or enable POP3 Login for customers Mail Accounts
 if ($email_pop3 != $result['pop3']) {
     $upd_stmt = Database::prepare("UPDATE `" . TABLE_MAIL_USERS . "` SET `pop3` = :pop3 WHERE `customerid` = :customerid");
     Database::pexecute($upd_stmt, array('pop3' => $email_pop3, 'customerid' => $id));
 }
 // Disable or enable IMAP Login for customers Mail Accounts
 if ($email_imap != $result['imap']) {
     $upd_stmt = Database::prepare("UPDATE `" . TABLE_MAIL_USERS . "` SET `imap` = :imap WHERE `customerid` = :customerid");
     Database::pexecute($upd_stmt, array('imap' => $email_imap, 'customerid' => $id));
 }
 $upd_data = array('customerid' => $id, 'passwd' => $password, 'name' => $name, 'firstname' => $firstname, 'gender' => $gender, 'company' => $company, 'street' => $street, 'zipcode' => $zipcode, 'city' => $city, 'phone' => $phone, 'fax' => $fax, 'email' => $email, 'customerno' => $customernumber, 'lang' => $def_language, 'diskspace' => $diskspace, 'traffic' => $traffic, 'subdomains' => $subdomains, 'emails' => $emails, 'email_accounts' => $email_accounts, 'email_forwarders' => $email_forwarders, 'email_quota' => $email_quota, 'ftps' => $ftps, 'tickets' => $tickets, 'mysqls' => $mysqls, 'deactivated' => $deactivated, 'phpenabled' => $phpenabled, 'imap' => $email_imap, 'pop3' => $email_pop3, 'perlenabled' => $perlenabled, 'custom_notes' => $custom_notes, 'custom_notes_show' => $custom_notes_show);
 $upd_stmt = Database::prepare("\n\t\t\t\t\t\tUPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET\n\t\t\t\t\t\t`name` = :name,\n\t\t\t\t\t\t`firstname` = :firstname,\n\t\t\t\t\t\t`gender` = :gender,\n\t\t\t\t\t\t`company` = :company,\n\t\t\t\t\t\t`street` = :street,\n\t\t\t\t\t\t`zipcode` = :zipcode,\n\t\t\t\t\t\t`city` = :city,\n\t\t\t\t\t\t`phone` = :phone,\n\t\t\t\t\t\t`fax` = :fax,\n\t\t\t\t\t\t`email` = :email,\n\t\t\t\t\t\t`customernumber` = :customerno,\n\t\t\t\t\t\t`def_language` = :lang,\n\t\t\t\t\t\t`password` = :passwd,\n\t\t\t\t\t\t`diskspace` = :diskspace,\n\t\t\t\t\t\t`traffic` = :traffic,\n\t\t\t\t\t\t`subdomains` = :subdomains,\n\t\t\t\t\t\t`emails` = :emails,\n\t\t\t\t\t\t`email_accounts` = :email_accounts,\n\t\t\t\t\t\t`email_forwarders` = :email_forwarders,\n\t\t\t\t\t\t`ftps` = :ftps,\n\t\t\t\t\t\t`tickets` = :tickets,\n\t\t\t\t\t\t`mysqls` = :mysqls,\n\t\t\t\t\t\t`deactivated` = :deactivated,\n\t\t\t\t\t\t`phpenabled` = :phpenabled,\n\t\t\t\t\t\t`email_quota` = :email_quota,\n\t\t\t\t\t\t`imap` = :imap,\n\t\t\t\t\t\t`pop3` = :pop3,\n\t\t\t\t\t\t`perlenabled` = :perlenabled,\n\t\t\t\t\t\t`custom_notes` = :custom_notes,\n\t\t\t\t\t\t`custom_notes_show` = :custom_notes_show\n\t\t\t\t\t\tWHERE `customerid` = :customerid");
 Database::pexecute($upd_stmt, $upd_data);
 // Using filesystem - quota, insert a task which cleans the filesystem - quota
 inserttask('10');
 $admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
 if ($mysqls != '-1' || $result['mysqls'] != '-1') {
     $admin_update_query .= ", `mysqls_used` = `mysqls_used` ";
     if ($mysqls != '-1') {
         $admin_update_query .= " + 0" . (int) $mysqls . " ";
     }
     if ($result['mysqls'] != '-1') {
         $admin_update_query .= " - 0" . (int) $result['mysqls'] . " ";
     }
 }
 if ($emails != '-1' || $result['emails'] != '-1') {
     $admin_update_query .= ", `emails_used` = `emails_used` ";
     if ($emails != '-1') {
         $admin_update_query .= " + 0" . (int) $emails . " ";
     }
开发者ID:mowamed,项目名称:Froxlor,代码行数:31,代码来源:admin_customers.php

示例11: loadConfigArrayDir

    $settings_data = loadConfigArrayDir('./actions/admin/settings/');
    $settings = loadSettings(&$settings_data, &$db);
    if (isset($_POST['send']) && $_POST['send'] == 'send') {
        if (processForm(&$settings_data, &$_POST, array('filename' => $filename, 'action' => $action, 'page' => $page))) {
            standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
        }
    } else {
        $fields = buildForm(&$settings_data);
        eval("echo \"" . getTemplate("settings/settings") . "\";");
    }
} elseif ($page == 'rebuildconfigs' && $userinfo['change_serversettings'] == '1') {
    if (isset($_POST['send']) && $_POST['send'] == 'send') {
        $log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
        inserttask('1');
        inserttask('4');
        inserttask('5');
        redirectTo('admin_index.php', array('s' => $s));
    } else {
        ask_yesno('admin_configs_reallyrebuild', $filename, array('page' => $page));
    }
} elseif ($page == 'updatecounters' && $userinfo['change_serversettings'] == '1') {
    if (isset($_POST['send']) && $_POST['send'] == 'send') {
        $log->logAction(ADM_ACTION, LOG_INFO, "updated resource-counters");
        $updatecounters = updateCounters(true);
        $customers = '';
        foreach ($updatecounters['customers'] as $customerid => $customer) {
            eval("\$customers.=\"" . getTemplate("settings/updatecounters_row_customer") . "\";");
        }
        $admins = '';
        foreach ($updatecounters['admins'] as $adminid => $admin) {
            eval("\$admins.=\"" . getTemplate("settings/updatecounters_row_admin") . "\";");
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:31,代码来源:admin_settings.php

示例12: inserttask

<?php

include 'methodes.php';
include 'check_log.php';
include './lang/lang.php';
$titre = $_POST['titre'];
$typetache = $_POST['typetache'];
$datedeb = $_POST['datedeb'];
$datefin = $_POST['datefin'];
$contenu = $_POST['contenu'];
$retour = inserttask($titre, $datedeb, $datefin, $contenu, $typetache);
header("Location: http://fc.isima.fr/~rophelizon/devweb_projet/{$retour}?lang={$lang}");
exit;
?>

开发者ID:Kas-r-kin,项目名称:My-to-do-list,代码行数:14,代码来源:GestionTache.php

示例13: makeCorrectDir

     $path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
     $backup_dbs = isset($_POST['backup_dbs']) ? intval($_POST['backup_dbs']) : 0;
     $backup_mail = isset($_POST['backup_mail']) ? intval($_POST['backup_mail']) : 0;
     $backup_web = isset($_POST['backup_web']) ? intval($_POST['backup_web']) : 0;
     if ($backup_dbs != '1') {
         $backup_dbs = '0';
     }
     if ($backup_mail != '1') {
         $backup_mail = '0';
     }
     if ($backup_web != '1') {
         $backup_web = '0';
     }
     $task_data = array('customerid' => $userinfo['customerid'], 'uid' => $userinfo['guid'], 'gid' => $userinfo['guid'], 'loginname' => $userinfo['loginname'], 'destdir' => $path, 'backup_dbs' => $backup_dbs, 'backup_mail' => $backup_mail, 'backup_web' => $backup_web);
     // schedule backup job
     inserttask('20', $task_data);
     standard_success('backupscheduled');
 } else {
     if (!empty($existing_backupJob)) {
         $action = "abort";
         $row = unserialize($entry['data']);
         $row['path'] = makeCorrectDir(str_replace($userinfo['documentroot'], "/", $row['destdir']));
         $row['backup_web'] = $row['backup_web'] == '1' ? $lng['panel']['yes'] : $lng['panel']['no'];
         $row['backup_mail'] = $row['backup_mail'] == '1' ? $lng['panel']['yes'] : $lng['panel']['no'];
         $row['backup_dbs'] = $row['backup_dbs'] == '1' ? $lng['panel']['yes'] : $lng['panel']['no'];
     }
     $pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
     $backup_data = (include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.backup.php');
     $backup_form = htmlform::genHTMLForm($backup_data);
     $title = $backup_data['backup']['title'];
     $image = $backup_data['backup']['image'];
开发者ID:asemen,项目名称:Froxlor,代码行数:31,代码来源:customer_extras.php


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