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

PHP update_status函数代码示例

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

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



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

示例1: error

function error($code, $msg)
{
    global $background_log, $task_id, $instance, $status_path;
    $log_line = date("Y-m-d h:i:s") . " - {$task_id} - {$instance} - {$code} - {$msg}\n";
    file_put_contents($background_log, $log_line, FILE_APPEND);
    if ($status_path !== "") {
        update_status($code, $msg);
    }
    done();
}
开发者ID:vljubovic,项目名称:c9etf,代码行数:10,代码来源:background.php


示例2: roster_resource_set

function roster_resource_set($user, $resource, $status = '', $message = '')
{
    global $roster;
    if (!isset($roster[$user])) {
        roster_add($user);
    }
    if ($status) {
        $roster[$user][$resource] = array('status' => $status, 'message' => $message);
    } else {
        unset($roster[$user][$resource]);
    }
    $status = status_aggregate($user);
    update_status($user, $status);
}
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:14,代码来源:presence.php


示例3: update_status

    update_status(gettext("Cleaning up..."));
    exec("/bin/rm -r /root/snort_rules_up");
    //	apc_clear_cache();
}
/* php code to flush out cache some people are reportting missing files this might help  */
sleep(2);
apc_clear_cache();
exec("/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync");
/* if snort is running hardrestart, if snort is not running do nothing */
if (file_exists("/tmp/snort_download_halt.pid")) {
    start_service("snort");
    update_status(gettext("The Rules update finished..."));
    update_output_window(gettext("Snort has restarted with your new set of rules..."));
    exec("/bin/rm /tmp/snort_download_halt.pid");
} else {
    update_status(gettext("The Rules update finished..."));
    update_output_window(gettext("You may start snort now..."));
}
/* hide progress bar and lets end this party */
hide_progress_bar_status();
conf_mount_ro();
?>

<?php 
function read_body_firmware($ch, $string)
{
    global $fout, $file_size, $downloaded, $counter, $version, $latest_version, $current_installed_pfsense_version;
    $length = strlen($string);
    $downloaded += intval($length);
    $downloadProgress = round(100 * (1 - $downloaded / $file_size), 0);
    $downloadProgress = 100 - $downloadProgress;
开发者ID:nagyrobi,项目名称:pfsense-packages,代码行数:31,代码来源:snort_download_rules.php


示例4: zen_db_scrub_in

     }
     break;
 case 'update_order':
     $status = zen_db_scrub_in($_POST['status'], true);
     $comments = $_POST['comments'];
     $comments = stripslashes($comments);
     $comments = trim($comments);
     $comments = mysql_escape_string($comments);
     $comments = htmlspecialchars($comments);
     $check_status = $db->Execute("select customers_id, customers_name, customers_email_address, orders_status,\r\n                                      date_purchased from " . TABLE_ORDERS . "\r\n                                      where orders_id = '" . (int) $oID . "'");
     if ($check_status->fields['orders_status'] != $status || zen_not_null($comments)) {
         $customer_notified = '0';
         if (isset($_POST['notify']) && $_POST['notify'] == 'on') {
             $customer_notified = '1';
         }
         update_status($oID, $status, $customer_notified, $comments);
         if ($customer_notified == '1') {
             email_latest_status($oID, $customer_notified);
         }
         if ($status == DOWNLOADS_ORDERS_STATUS_UPDATED_VALUE) {
             // adjust download_maxdays based on current date
             $zc_max_days = date_diff($check_status->fields['date_purchased'], date('Y-m-d H:i:s', time())) + DOWNLOAD_MAX_DAYS;
             $update_downloads_query = "update " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " set download_maxdays='" . $zc_max_days . "', download_count='" . DOWNLOAD_MAX_COUNT . "' where orders_id='" . (int) $oID . "'";
             $db->Execute($update_downloads_query);
         }
         $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
     } else {
         $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
     }
     zen_redirect(zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('action')) . 'action=edit', $request_type));
     break;
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:31,代码来源:super_orders.php


示例5: suricata_fetch_new_rules

function suricata_fetch_new_rules($file_url, $file_dst, $file_md5, $desc = "")
{
    /**********************************************************/
    /* This function downloads the passed rules file and      */
    /* compares its computed md5 hash to the passed md5 hash  */
    /* to verify the file's integrity.                        */
    /*                                                        */
    /* On Entry: $file_url = URL of rules file                */
    /*           $file_dst = Temp destination to store the    */
    /*                       downloaded rules file            */
    /*           $file_md5 = Expected md5 hash for the new    */
    /*                       downloaded rules file            */
    /*           $desc     = Short text string for use in     */
    /*                       log messages                     */
    /*                                                        */
    /*  Returns: TRUE if download was successful.             */
    /*           FALSE if download was not successful.        */
    /**********************************************************/
    global $pkg_interface, $last_curl_error, $update_errors;
    $suricatadir = SURICATADIR;
    $filename = basename($file_dst);
    if ($pkg_interface != "console") {
        update_status(gettext("There is a new set of {$desc} posted. Downloading..."));
    }
    log_error(gettext("[Suricata] There is a new set of {$desc} posted. Downloading {$filename}..."));
    error_log(gettext("\tThere is a new set of {$desc} posted.\n"), 3, SURICATA_RULES_UPD_LOGFILE);
    error_log(gettext("\tDownloading file '{$filename}'...\n"), 3, SURICATA_RULES_UPD_LOGFILE);
    $rc = suricata_download_file_url($file_url, $file_dst);
    // See if the download from the URL was successful
    if ($rc === true) {
        if ($pkg_interface != "console") {
            update_status(gettext("Done downloading {$desc} file."));
        }
        log_error("[Suricata] {$desc} file update downloaded successfully");
        error_log(gettext("\tDone downloading rules file.\n"), 3, SURICATA_RULES_UPD_LOGFILE);
        // Test integrity of the rules file.  Turn off update if file has wrong md5 hash
        if ($file_md5 != trim(md5_file($file_dst))) {
            if ($pkg_interface != "console") {
                update_output_window(gettext("{$desc} file MD5 checksum failed..."));
            }
            log_error(gettext("[Suricata] {$desc} file download failed.  Bad MD5 checksum..."));
            log_error(gettext("[Suricata] Downloaded File MD5: " . md5_file($file_dst)));
            log_error(gettext("[Suricata] Expected File MD5: {$file_md5}"));
            error_log(gettext("\t{$desc} file download failed.  Bad MD5 checksum.\n"), 3, SURICATA_RULES_UPD_LOGFILE);
            error_log(gettext("\tDownloaded {$desc} file MD5: " . md5_file($file_dst) . "\n"), 3, SURICATA_RULES_UPD_LOGFILE);
            error_log(gettext("\tExpected {$desc} file MD5: {$file_md5}\n"), 3, SURICATA_RULES_UPD_LOGFILE);
            error_log(gettext("\t{$desc} file download failed.  {$desc} will not be updated.\n"), 3, SURICATA_RULES_UPD_LOGFILE);
            $update_errors = true;
            return false;
        }
        return true;
    } else {
        if ($pkg_interface != "console") {
            update_output_window(gettext("{$desc} file download failed..."));
        }
        log_error(gettext("[Suricata] {$desc} file download failed... server returned error '{$rc}'..."));
        error_log(gettext("\t{$desc} file download failed.  Server returned error {$rc}.\n"), 3, SURICATA_RULES_UPD_LOGFILE);
        if ($pkg_interface == "console") {
            error_log(gettext("\tThe error text was: {$last_curl_error}\n"), 3, SURICATA_RULES_UPD_LOGFILE);
        }
        error_log(gettext("\t{$desc} will not be updated.\n"), 3, SURICATA_RULES_UPD_LOGFILE);
        $update_errors = true;
        return false;
    }
}
开发者ID:randyqx,项目名称:pfsense-packages,代码行数:65,代码来源:suricata_check_for_rule_updates.php


示例6: delete_package

                delete_package($pkgtodo['name'] . '-' . $pkgtodo['version'], $pkg_id);
                delete_package_xml($pkgtodo['name']);
                install_package($pkgtodo['name']);
                $pkg_id++;
            }
        }
        update_status("All packages reinstalled.");
        $static_output .= "\n\nAll packages reinstalled.";
        start_service(htmlspecialchars($_GET['pkg']));
        update_output_window($static_output);
        break;
    default:
        $status = install_package(htmlspecialchars($_GET['id']));
        if ($status == -1) {
            update_status("Installation of " . htmlspecialchars($_GET['id']) . " FAILED!");
            $static_output .= "\n\nInstallation halted.";
        } else {
            update_status("Installation of " . $_GET['id'] . " completed.");
            $static_output .= "\n\nInstallation completed.   Please check to make sure that the package is configured from the respective menu then start the package.";
        }
        update_output_window($static_output);
}
// Delete all temporary package tarballs and staging areas.
unlink_if_exists("/tmp/apkg_*");
rmdir_recursive("/var/tmp/instmp*");
/* read only fs */
conf_mount_ro();
// close log
if ($fd_log) {
    fclose($fd_log);
}
开发者ID:rootsghost,项目名称:5651-pfsense,代码行数:31,代码来源:pkg_mgr_install.php


示例7: snort_apply_customizations

function snort_apply_customizations($snortcfg, $if_real)
{
    global $config, $g, $snortdir;
    if (empty($snortcfg['rulesets'])) {
        return;
    } else {
        update_status(gettext("Your set of configured rules are being copied..."));
        log_error("Your set of configured rules are being copied...");
        $enabled_rulesets_array = explode("||", $snortcfg['rulesets']);
        foreach ($enabled_rulesets_array as $enabled_item) {
            @copy("{$snortdir}/rules/{$enabled_item}", "{$snortdir}/snort_{$snortcfg['uuid']}_{$if_real}/rules/{$enabled_item}");
            if (substr($enabled_item, 0, 5) == "snort" && substr($enabled_item, -9) == ".so.rules") {
                $slib = substr($enabled_item, 6, -6);
                if (file_exists("/usr/local/lib/snort/dynamicrules/{$slib}")) {
                    @copy("/usr/local/lib/snort/dynamicrules/{$slib}", "{$snortdir}/snort_{$snortcfg['uuid']}_{$if_real}/dynamicrules/{$slib}");
                }
            }
        }
        @copy("{$snortdir}/classification.config", "{$snortdir}/snort_{$snortcfg['uuid']}_{$if_real}/classification.config");
        @copy("{$snortdir}/gen-msg.map", "{$snortdir}/snort_{$snortcfg['uuid']}_{$if_real}/gen-msg.map");
        if (is_dir("{$snortdir}/generators")) {
            exec("/bin/cp -r {$snortdir}/generators {$snortdir}/snort_{$snortcfg['uuid']}_{$if_real}");
        }
        @copy("{$snortdir}/reference.config", "{$snortdir}/snort_{$snortcfg['uuid']}_{$if_real}/reference.config");
        @copy("{$snortdir}/sid", "{$snortdir}/snort_{$snortcfg['uuid']}_{$if_real}/sid");
        @copy("{$snortdir}/sid-msg.map", "{$snortdir}/snort_{$snortcfg['uuid']}_{$if_real}/sid-msg.map");
        @copy("{$snortdir}/unicode.map", "{$snortdir}/snort_{$snortcfg['uuid']}_{$if_real}/unicode.map");
    }
    if (!empty($snortcfg['rule_sid_on']) || !empty($snortcfg['rule_sid_off'])) {
        if (!empty($snortcfg['rule_sid_on'])) {
            $enabled_sid_on_array = explode("||", trim($snortcfg['rule_sid_on']));
            $enabled_sids = array_flip($enabled_sid_on_array);
        }
        if (!empty($snortcfg['rule_sid_off'])) {
            $enabled_sid_off_array = explode("||", trim($snortcfg['rule_sid_off']));
            $disabled_sids = array_flip($enabled_sid_off_array);
        }
        $files = glob("{$snortdir}/snort_{$snortcfg}_{$if_real}/rules/*.rules");
        foreach ($files as $file) {
            $splitcontents = file($file);
            $changed = false;
            foreach ($splitcontents as $counter => $value) {
                $sid = snort_get_rule_part($value, 'sid:', ';', 0);
                if (!is_numeric($sid)) {
                    continue;
                }
                if (isset($enabled_sids["enablesid {$sid}"])) {
                    if (substr($value, 0, 5) == "alert") {
                        /* Rule is already enabled */
                        continue;
                    }
                    if (substr($value, 0, 7) == "# alert") {
                        /* Rule is disabled, change */
                        $splitcontents[$counter] = substr($value, 2);
                        $changed = true;
                    } else {
                        if (substr($splitcontents[$counter - 1], 0, 5) == "alert") {
                            /* Rule is already enabled */
                            continue;
                        } else {
                            if (substr($splitcontents[$counter - 1], 0, 7) == "# alert") {
                                /* Rule is disabled, change */
                                $splitcontents[$counter - 1] = substr($value, 2);
                                $changed = true;
                            }
                        }
                    }
                } else {
                    if (isset($disabled_sids["disablesid {$sid}"])) {
                        if (substr($value, 0, 7) == "# alert") {
                            /* Rule is already disabled */
                            continue;
                        }
                        if (substr($value, 0, 5) == "alert") {
                            /* Rule is enabled, change */
                            $splitcontents[$counter] = "# {$value}";
                            $changed = true;
                        } else {
                            if (substr($splitcontents[$counter - 1], 0, 7) == "# alert") {
                                /* Rule is already disabled */
                                continue;
                            } else {
                                if (substr($splitcontents[$counter - 1], 0, 5) == "alert") {
                                    /* Rule is enabled, change */
                                    $splitcontents[$counter - 1] = "# {$value}";
                                    $changed = true;
                                }
                            }
                        }
                    }
                }
            }
            if ($changed == true) {
                @file_put_contents($file, implode("\n", $splitcontents));
            }
        }
    }
}
开发者ID:netceler,项目名称:pfsense-packages,代码行数:98,代码来源:snort_check_for_rule_updates.php


示例8: shell_exec

$result = $db->query("SELECT qid, command FROM queue WHERE status = 0");
if ($result->num_rows == 0) {
	if ($debug) logger("No queue found!");	
} else {
	while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
		$qid = $row['qid'];
		$command = $row['command'];
		update_status(1, $qid);
		logger("Going to run $command");
		$output = shell_exec($command);
		if (is_null($output)) {
			logger("Failed to run $command");
		} else {
			logger("Finished command $command");
			update_status(2, $qid);
		}
	}
}

function update_status($status, $qid) {
	global $db;
	$result = $db->query("UPDATE queue SET status = '$status' WHERE qid = '$qid'");
	if ($result) {
		logger("Updated status to $status for queue $qid");
	} else {
		logger("Failed to update queue $qid");
	}
}

// Log to logfile
开发者ID:phoe721,项目名称:phoe721.com,代码行数:30,代码来源:runQueue.php


示例9: batch_status

function batch_status($oID, $status, $comments, $notify = 0, $notify_comments = 0)
{
    global $db, $messageStack;
    require DIR_WS_LANGUAGES . 'english/super_orders.php';
    $order_updated = false;
    $check_status = $db->Execute("select customers_name, customers_email_address, orders_status,\r\n                                date_purchased from " . TABLE_ORDERS . "\r\n                                where orders_id = '" . (int) $oID . "'");
    if ($check_status->fields['orders_status'] != $status || zen_not_null($comments)) {
        $customer_notified = '0';
        if (isset($_POST['notify']) && $_POST['notify'] == 'on') {
            $customer_notified = '1';
        }
        update_status($oID, $status, $customer_notified, $comments);
        if ($customer_notified == '1') {
            email_latest_status($oID, $notify_comments);
        }
        $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
    } else {
        $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
    }
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:20,代码来源:super_batch_status.php


示例10: require_valide_referring_url

include_once 'includes/init.php';
require_valide_referring_url();
send_no_cache_header();
if (empty($user)) {
    $user = $login;
}
if (!empty($_POST)) {
    $process_action = getPostValue('process_action');
    $process_user = getPostValue('process_user');
    if (!empty($process_action)) {
        foreach ($_POST as $tid => $app_user) {
            if (substr($tid, 0, 5) == 'entry') {
                $type = substr($tid, 5, 1);
                $id = substr($tid, 6);
                if (empty($error) && $id > 0) {
                    update_status($process_action, $app_user, $id, $type);
                }
            }
        }
    }
}
// Only admin user or assistant can specify a username other than his own.
if (!$is_admin && $user != $login && !$is_assistant && !access_is_enabled()) {
    $user = $login;
}
// Make sure we return after editing an event via this page.
remember_this_view();
$key = 0;
$eventinfo = $noret = '';
/* List all unapproved events for the specified user.
 * Exclude "extension" events (used when an event goes past midnight).
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:list_unapproved.php


示例11: trim

<p>

<?php 
/* Define necessary variables. */
$firmware_version = trim(file_get_contents('/etc/version'));
$static_text = "Downloading current version information... ";
update_output_window($static_text);
$static_text .= "done.\n";
update_output_window($static_text);
if (isset($curcfg['alturl']['enable'])) {
    $updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
} else {
    $updater_url = $g['update_url'];
}
update_status("Downloading current version information...");
$latest_version = download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
if (strstr($latest_version, "404")) {
    update_output_window("Could not download version information file {$updater_url}/version");
    include "fend.inc";
    exit;
}
$current_installed_pfsense_version = str_replace("\n", "", file_get_contents("/etc/version"));
$latest_version = str_replace("\n", "", file_get_contents("/tmp/{$g['product_name']}_version"));
$needs_system_upgrade = false;
if ($current_installed_pfsense_version != $latest_version) {
    $needs_system_upgrade = true;
}
if (!$latest_version) {
    if (isset($curcfg['alturl']['enable'])) {
        update_output_window("Could not contact custom update server.");
开发者ID:rootsghost,项目名称:5651-pfsense,代码行数:30,代码来源:system_firmware_check.php


示例12: scan

            $OUTPUT = scan();
            break;
        case "enter":
            $OUTPUT = enter();
            break;
        case "write":
            $OUTPUT = write();
            break;
        case "select":
            $OUTPUT = select_view();
            break;
        case "view":
            $OUTPUT = view();
            break;
        case "status":
            $OUTPUT = update_status();
            break;
    }
} else {
    $OUTPUT = scan();
}
require "../template.php";
function scan()
{
    $invoice = array("invoice" => "Scan Invoice");
    $barcode = flashRed($invoice);
    $barcode = $barcode["invoice"];
    $sorder_num = decrypt_barcode($barcode);
    if (empty($sorder_num) || !is_numeric($sorder_num)) {
        $sorder_num = 0;
    }
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:31,代码来源:signed_invoices.php


示例13: getValue

';
        exit;
    }
}
$user = getValue('user');
$type = getValue('type');
$id = getValue('id');
// Allow administrators to approve public events.
$app_user = $PUBLIC_ACCESS == 'Y' && !empty($public) && $is_admin ? '__public__' : ($is_assistant || $is_nonuser_admin ? $user : $login);
// If User Access Control is enabled, we check to see if they are
// allowed to approve for the specified user.
if (access_is_enabled() && !empty($user) && $user != $login && access_user_calendar('approve', $user)) {
    $app_user = $user;
}
if (empty($error) && $id > 0) {
    update_status('A', $app_user, $id, $type);
}
if (!empty($comments) && empty($cancel)) {
    $mail = new WebCalMailer();
    // Email event creator to notify that it was approved with comments.
    // Get the name of the event.
    $res = dbi_execute('SELECT cal_name, cal_description, cal_date, cal_time,
    cal_create_by FROM webcal_entry WHERE cal_id = ?', array($id));
    if ($res) {
        $row = dbi_fetch_row($res);
        $name = $row[0];
        $description = $row[1];
        $fmtdate = $row[2];
        $time = sprintf("%06d", $row[3]);
        $creator = $row[4];
        dbi_free_result($res);
开发者ID:GetInTheGo,项目名称:JohnsonFinancialService,代码行数:31,代码来源:approve_entry.php


示例14: sync

function sync($id, $nopid = false)
{
    $unix = new unix();
    $users = new usersMenus();
    system_admin_events("Mail synchronization: Running task {$id}", __FUNCTION__, __FILE__, __LINE__);
    $GLOBALS["unique_id"] = $id;
    $ASOfflineImap = false;
    $sql = "SELECT * FROM imapsync WHERE ID='{$id}'";
    $q = new mysql();
    $took1 = time();
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    if (!$q->ok) {
        system_admin_events("Mysql error {$q->mysql_error}", __FUNCTION__, __FILE__, __LINE__);
        die;
    }
    $pid = $ligne["pid"];
    if (!$nopid) {
        if ($unix->process_exists($pid)) {
            return;
        }
    }
    update_pid(getmypid());
    if (!is_file($unix->find_program("imapsync"))) {
        if (!is_file($unix->find_program("offlineimap"))) {
            update_status(-1, "Could not find imapsync/offlineimap program");
            return;
        }
    }
    update_status(1, "Executed");
    include_once dirname(__FILE__) . '/ressources/class.user.inc';
    $ct = new user($ligne["uid"]);
    $parameters = unserialize(base64_decode($ligne["parameters"]));
    $parameters["sep"] = trim($parameters["sep"]);
    $parameters["sep2"] = trim($parameters["sep2"]);
    $parameters["maxage"] = trim($parameters["maxage"]);
    if ($parameters["maxage"] == null) {
        $parameters["maxage"] = 0;
    }
    if ($parameters["UseOfflineImap"] == 1) {
        $ASOfflineImap = true;
    }
    $offlineImapConf[] = "[general]";
    $offlineImapConf[] = "metadata = /var/lib/offlineimap/{$ligne["uid"]}";
    if ($ASOfflineImap) {
        @mkdir("/var/lib/offlineimap/{$ligne["uid"]}", null, true);
    }
    $offlineImapConf[] = "accounts = Myaccount";
    $offlineImapConf[] = "maxsyncaccounts = 1";
    $offlineImapConf[] = "ui =Noninteractive.Basic, Noninteractive.Quiet";
    $offlineImapConf[] = "ignore-readonly = no";
    $offlineImapConf[] = "socktimeout = 60";
    $offlineImapConf[] = "fsync = true";
    $offlineImapConf[] = "";
    $offlineImapConf[] = "[ui.Curses.Blinkenlights]";
    $offlineImapConf[] = "statuschar = .";
    $offlineImapConf[] = "";
    $offlineImapConf[] = "[Account Myaccount]";
    $offlineImapConf[] = "localrepository = TargetServer";
    $offlineImapConf[] = "remoterepository = SourceServer";
    $offlineImapConf[] = "# autorefresh = 5";
    $offlineImapConf[] = "# quick = 10";
    $offlineImapConf[] = "# presynchook = imapfilter";
    $offlineImapConf[] = "# postsynchook = notifysync.sh";
    $offlineImapConf[] = "# presynchook = imapfilter -c someotherconfig.lua";
    $offlineImapConf[] = "# maxsize = 2000000";
    if ($parameters["maxage"] > 0) {
        $offlineImapConf[] = "maxage = {$parameters["maxage"]}";
    }
    $array_folders = unserialize(base64_decode($ligne["folders"]));
    if ($users->cyrus_imapd_installed) {
        $local_mailbox = true;
    }
    if ($users->ZARAFA_INSTALLED) {
        $local_mailbox = true;
    }
    if ($local_mailbox) {
        if ($parameters["local_mailbox"] == null) {
            $parameters["local_mailbox"] = 1;
        }
        if ($parameters["local_mailbox_source"] == null) {
            $parameters["local_mailbox_source"] = 1;
        }
    } else {
        $parameters["local_mailbox"] = 0;
        $parameters["local_mailbox_source"] = 0;
    }
    if ($parameters["dest_imap_server"] == null) {
        if ($parameters["local_mailbox"] == 1) {
            $parameters["dest_imap_server"] = "127.0.0.1";
        }
    }
    if (!$local_mailbox) {
        if ($parameters["remote_imap_server"] == null) {
            if ($GLOBALS["VERBOSE"]) {
                echo "unable to get SOURCE imap server\n";
            }
            update_status(-1, "unable to get SOURCE imap server");
            return;
        }
        if ($parameters["dest_imap_server"] == null) {
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:exec.mailsync.php


示例15: mysql_query

$user_custom = $_POST['custom'];
if (strcmp($res, "VERIFIED") == 0) {
    // check the payment_status is Completed
    // check that txn_id has not been previously processed
    // check that receiver_email is your Primary PayPal email
    // check that payment_amount/payment_currency are correct
    // process payment
    if ($payment_status == 'Completed') {
        $query = "SELECT 'txn_id' FROM membership_ipn WHERE txn_id ='" . $txn_id . "'";
        $result = mysql_query($query);
        if (mysql_num_rows($result) == 0) {
            if ($receiver_email == '[email protected]') {
                if ($payment_amount == '15.75' || ($payment_amount = '26.50' && $payment_currency == 'USD')) {
                    $type = type_of_member($payment_amount);
                    $expired_date = get_expired_date($type);
                    update_status($txn_id, $expired_date, $user_custom, $type);
                    //add information into database
                    //email also
                    //update premium
                } else {
                    //payment balance is not right!
                }
            } else {
                //receover_email is not right
            }
        } else {
        }
        //check for txn_id
    }
    //check for payment status
} else {
开发者ID:howareyoucolin,项目名称:demo,代码行数:31,代码来源:membership_ipn.php


示例16: translate

}
// Only admin users can modify events on the public calendar.
if (empty($error) && $PUBLIC_ACCESS == 'Y' && $user == '__public__' && !$is_admin) {
    // translate ( 'not admin' )
    $error = translate('Not authorized (not admin).');
}
if (empty($error) && !$is_admin && $user != $login) {
    // Non-admin user has request to modify event on someone else's calendar.
    if (access_is_enabled()) {
        if (!access_user_calendar('approve', $user)) {
            $error = translate('Not authorized');
        }
    } else {
        // TODO: Support boss/assistant when UAC is not enabled.
        $error = translate('Not authorized');
    }
}
if (strpos(' approvedeletereject', $action)) {
    update_status(ucfirst($action), $user, $id);
}
$out .= (empty($error) ? '
  <success/>' : '
  <error>' . ws_escape_xml($error) . '</error>') . '
</result>
';
// If web service debugging is on...
if (!empty($WS_DEBUG) && $WS_DEBUG) {
    ws_log_message($out);
}
// Send output now...
echo $out;
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:event_mod.php


示例17: import_users

function import_users($id)
{
    $unix = new unix();
    $pidfile = "/etc/artica-postfix/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $pid = trim(@file_get_contents($pidfile));
    if ($unix->process_exists($pid)) {
        echo "[" . getmypid() . "]:: Process {$pid} already running...\n";
        die;
    }
    $pid = getmypid();
    @file_put_contents($pidfile, $pid);
    $emailing = new emailings($id);
    if ($emailing->error) {
        echo __FUNCTION__ . " class error: {$emailing->mysql_error}\n";
        exit;
    }
    $sql = "SELECT * FROM {$emailing->tablename}";
    $q = new mysql();
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo __FUNCTION__ . " {$q->mysql_error}\n";
        exit;
    }
    $max = mysql_num_rows($results);
    $ldap = new clladp();
    $domains = $ldap->Hash_domains_table($ou);
    while (list($domain, $no) = each($domains)) {
        $DOMAINS_ARRAY[$domain] = true;
    }
    if ($emailing->array_options["export_domain"] == null) {
        update_export_status($id, 110, "No default domain set");
        return;
    }
    if ($emailing->array_options["gpid"] == null) {
        update_export_status($id, 110, "No default group set");
        return;
    }
    $gpid = $emailing->array_options["gpid"];
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $count = $count + 1;
        $tw = $tw + 1;
        $firstname = $ligne["firstname"];
        $lastname = $ligne["lastname"];
        $email = $ligne["email"];
        $phone = $ligne["phone"];
        $city = $ligne["city"];
        $cp = $ligne["cp"];
        $postaladdress = $ligne["postaladdress"];
        if (!preg_match("#(.+?)@#", $email, $re)) {
            continue;
        }
        $uid = $re[1];
        $new_email = "{$uid}@{$emailing->array_options["export_domain"]}";
        $ct = new user($uid);
        if (!$ct->DoesNotExists) {
            $GLOBALS["SUCCESS_CONTACTS"] = $GLOBALS["SUCCESS_CONTACTS"] + 1;
            echo "{$emailing->ou}/{$uid}::{$new_email} {$firstname} {$lastname} already exists [SUCCESS]\n";
        }
        $ct->mail = $new_email;
        $ct->postalCode = $cp;
        $ct->postalAddress = $postaladdress;
        $ct->town = $city;
        $ct->telephoneNumber = $phone;
        $ct->DisplayName = "{$firstname} {$lastname}";
        $ct->sn = $lastname;
        $ct->givenName = $firstname;
        $ct->group_id = $gpid;
        $ct->ou = $emailing->ou;
        $ct->password = $emailing->array_options["export_default_password"];
        if ($tw > 2) {
            $purc = $count / $max;
            $purc = $purc * 100;
            $purc = round($purc, 0);
            update_export_status($id, $purc);
            $tw = 0;
        }
        if (!$ct->add_user()) {
            writeevent("{$emailing->ou}/{$uid}::{$new_email} {$firstname} {$lastname} [FAILED]");
            $GLOBALS["FAILED_CONTACTS"] = $GLOBALS["FAILED_CONTACTS"] + 1;
            continue;
        }
        $GLOBALS["SUCCESS_CONTACTS"] = $GLOBALS["SUCCESS_CONTACTS"] + 1;
        writeevent("{$emailing->ou}/{$uid}::{$new_email} {$firstname} {$lastname} [SUCCESS]");
        if ($new_email != $email) {
            $user = new user($uid);
            $user->add_alias($email);
        }
    }
    writeevent("Failed.:{$GLOBALS["FAILED_CONTACTS"]}", $id);
    writeevent("Success:{$GLOBALS["SUCCESS_CONTACTS"]}", $id);
    update_status($id, 100, 1, null);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:92,代码来源:exec.emailing-import.php


示例18: force_page

<?php

require_once "include.php";
if (empty($VAR['wo_id'])) {
    force_page('core', 'error&error_msg=No Work Order ID');
    exit;
}
if (isset($VAR['submit'])) {
    if (!update_status($db, $VAR)) {
        force_page('core', 'error&error_msg=Falied to update work order status');
        exit;
    } else {
        force_page('workorder', 'view&wo_id=' . $VAR['wo_id'] . '&page_title=Work%20Order%20ID%20' . $VAR['wo_id']);
        exit;
    }
} else {
    $smarty->assign('wo_id', $VAR['wo_id']);
    $smarty->display('workorder' . SEP . 'new_status.tpl');
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:19,代码来源:new_status.php


示例19: filter_configure

             filter_configure();
             send_event("service restart packages");
         } else {
             update_output_window(gettext("No packages are installed."));
         }
         break;
     case 'installed':
     default:
         $status = install_package($pkgid);
         if ($status != 0) {
             update_status(gettext("Installation of") . " {$pkgid} " . gettext("FAILED!"));
             $static_output .= "\n" . gettext("Installation halted.");
             update_output_window($static_output);
         } else {
             $status_a = gettext(sprintf("Installation of %s completed.", $pkgid));
             update_status($status_a);
             $status = get_after_install_info($pkgid);
             if ($status) {
                 $static_output .= "\n" . gettext("Installation completed.") . "\n{$pkgid} " . gettext("setup instructions") . ":\n{$status}";
             } else {
                 $static_output .= "\n" . gettext("Installation completed.   Please check to make sure that the package is configured from the respective menu then start the package.");
             }
             @file_put_contents("/tmp/{$pkgid}.info", $static_output);
             echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$pkgid}\";</script>";
         }
         filter_configure();
         break;
 }
 // Delete all temporary package tarballs and staging areas.
 unlink_if_exists("/tmp/apkg_*");
 rmdir_recursive("/var/tmp/instmp*");
开发者ID:nmccurdy,项目名称:pfsense,代码行数:31,代码来源:pkg_mgr_install.php


示例20: update_projects

            break;
        case 'projects':
            if ($func == 'update_projects') {
                update_projects($_POST['Sel']);
            }
            edit_projects();
            break;
        case 'priorities':
            if ($func == 'update_priorities') {
                update_priorities($_POST['Sel']);
            }
            edit_priorities();
            break;
        case 'status':
            if ($func == 'update_status') {
                update_status($_POST['Sel']);
            }
            edit_status();
            break;
        case 'edit_globals':
            if ($func == 'mod_globals') {
                mod_globals($_POST['mod_varname'], $_POST['mod_definition'], $_POST['mod_action']);
            }
            edit_globals();
            break;
    }
}
$tabtable->print_foot();
function edit_agents()
{
    global $admin_tabtable, $prefix, $hlpdsk_prefix, $name, $hlpdsk_theme, $nuke_user_id_fieldname, $nuke_username_fieldname, $action, $button_submit, $button_left, $button_right, $GO_THEME, $GO_LANGUAGE, $strUser, $strGroups;
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:admin.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP update_subscriptions函数代码示例发布时间:2022-05-23
下一篇:
PHP update_stats函数代码示例发布时间: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