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


PHP do_log函数代码示例

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


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

示例1: error_out

function error_out($err_arg)
{
    // 2/10/12
    do_log($GLOBALS['LOG_ERROR'], 0, 0, $err_arg);
    // logs supplied error message
    echo "";
    // ajax return data
    exit;
    // finished - die
}
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:10,代码来源:get_latest_id.php

示例2: error_handler

/**
 * In case of any error, redirect to a dummy page with error details
 */
function error_handler($errno, $errstr, $errfile, $errline)
{
    global $cfg, $url;
    do_log("Error at line {$errline} - {$errstr}. URL: {$url}");
    if (!empty($cfg['config']['test_mode'])) {
        // return error msg to client
        echo '301:http://error-at-line-' . (int) $errline . '/' . urlencode($errstr) . "\n";
    } else {
        echo $url . "\n";
        // fail silently
    }
    die;
}
开发者ID:fyhqycom,项目名称:squid-imposter,代码行数:16,代码来源:rewrite.php

示例3: do_login

function do_login($requested_page, $outinfo = FALSE, $hh = FALSE)
{
    // do login/ses sion code - returns array - 2/12/09, 3/8/09
    global $hide_dispatched, $hide_status_groups;
    @session_start();
    global $expiry, $istest;
    $now = mysql_format_date(time() - intval(get_variable('delta_mins')) * 60);
    $the_sid = isset($_SESSION['id']) ? $_SESSION['id'] : null;
    //																			7/3/11
    $warn = array_key_exists('expires', $_SESSION) && $now > $_SESSION['expires'] ? "Log-in has expired due to inactivity.  Please log in again." : "";
    $internet = get_variable("internet");
    // 8/22/10
    $temp = implode(";", $_SESSION);
    if (array_key_exists('user_id', $_SESSION) && is_expired($_SESSION['user_id'])) {
        $the_date = mysql_format_date($expiry);
        $sess_key = session_id();
        // not expired
        $query = "UPDATE `{$GLOBALS['mysql_prefix']}user` SET `expires`= '{$the_date}' WHERE `sid` = '{$sess_key}' LIMIT 1";
        $result = mysql_query($query) or do_error("", 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
        $_SESSION['expires'] = $expiry;
        $warn = "";
        if ($internet == 3) {
            set_filenames($internet);
        }
        // possible change to filenames based on connect status - 8/31/10
    } else {
        // not logged in; now either get form data or db check form entries
        if (array_key_exists('frm_passwd', $_POST)) {
            // first, db check
            // 6/25/10
            $categories = array();
            // 3/15/11
            $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}assigns` WHERE `clear` <> 'NULL'";
            // 3/15/11
            $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
            $num_disp = mysql_num_rows($result);
            //
            if ($num_disp > 0 && $hide_dispatched == 1) {
                $category_butts[0] = "Deployed";
                $i = 1;
            } else {
                $i = 0;
            }
            if ($hide_status_groups == 1) {
                // 3/15/11
                $query = "SELECT DISTINCT `group` FROM `{$GLOBALS['mysql_prefix']}un_status` ORDER BY `group` ASC";
                $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
                while ($row = stripslashes_deep(mysql_fetch_assoc($result))) {
                    $categories[$i] = $row['group'];
                    $i++;
                }
                unset($result);
            } else {
                $categories[$i] = "Available";
                $i++;
                $categories[$i] = "Not Available";
            }
            $fac_categories = array();
            $i = 0;
            $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}fac_types` ORDER BY `name` ASC";
            $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
            while ($row = stripslashes_deep(mysql_fetch_assoc($result))) {
                $fac_categories[$i] = $row['name'];
                $i++;
            }
            unset($result);
            $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}user` \n\t\t\t\tWHERE `user`=" . quote_smart($_POST['frm_user']) . " \t \n\t\t\t\tAND (`passwd`=PASSWORD(" . quote_smart($_POST['frm_passwd']) . ") \n\t\t\t\tOR `passwd`=MD5(" . quote_smart(strtolower($_POST['frm_passwd'])) . " ))  \n\t\t\t\tLIMIT 1";
            $result = mysql_query($query) or do_error("", 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
            if (mysql_affected_rows() == 1) {
                $row = stripslashes_deep(mysql_fetch_assoc($result));
                if ($row['sortorder'] == NULL) {
                    $row['sortorder'] = "date";
                }
                $dir = $row['sort_desc'] ? " DESC " : "";
                $sid = session_id();
                // 1/8/10
                $browser = checkBrowser(FALSE);
                $the_date = mysql_format_date($expiry);
                $query = "UPDATE `{$GLOBALS['mysql_prefix']}user` SET \n\t\t\t\t\t`sid` = '{$sid}', \n\t\t\t\t\t`expires`= '{$the_date}', \n\t\t\t\t\t`login` = '{$now}', \n\t\t\t\t\t`_from`= '{$_SERVER['REMOTE_ADDR']}', \n\t\t\t\t\t`browser` = '{$browser}'  \n\t\t\t\t\tWHERE `id` = {$row['id']} LIMIT 1";
                $result = mysql_query($query) or do_error("", 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
                $_SESSION['id'] = $sid;
                $_SESSION['expires'] = time();
                $_SESSION['user_id'] = $row['id'];
                $_SESSION['user'] = $row['user'];
                $_SESSION['level'] = $row['level'];
                $_SESSION['login_at'] = $now;
                $_SESSION['scr_height'] = $_POST['scr_height'];
                $_SESSION['scr_width'] = $_POST['scr_width'];
                // monitor dimensions this user
                $_SESSION['allow_dirs'] = TRUE;
                // allow directions
                $_SESSION['show_closed'] = TRUE;
                // show closed dispatched
                $_SESSION['sortorder'] = $row['sortorder'] == NULL ? "date" : $row['sortorder'];
                $_SESSION['sort_desc'] = $row['sort_desc'] == NULL ? " DESC " : $row['sort_desc'];
                $_SESSION['ticket_per_page'] = 0;
                $_SESSION['show_hide_unit'] = "s";
                // show/hide units
                $_SESSION['show_hide_unav'] = "s";
                // show/hide unavailable units - 4/27/10
//.........这里部分代码省略.........
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:101,代码来源:login.inc.php

示例4: empty

    $frm_lng = empty($_POST['frm_lng']) ? 'NULL' : quote_smart(trim($_POST['frm_lng']));
    // 7/15/10
    $now = mysql_format_date(time() - get_variable('delta_mins') * 60);
    $query = "INSERT INTO `{$GLOBALS['mysql_prefix']}facilities` (\n\t\t\t`name`, `street`, `city`, `state`, `handle`, `icon_str`, `boundary`, `description`, `capab`, `status_id`, `contact_name`, `contact_email`, `contact_phone`, `security_contact`, `security_email`, `security_phone`, `opening_hours`, `access_rules`, `security_reqs`, `pager_p`, `pager_s`, `lat`, `lng`, `type`, `user_id`, `updated` )\n\t\t\tVALUES (" . quote_smart(trim($_POST['frm_name'])) . "," . quote_smart(trim($_POST['frm_street'])) . "," . quote_smart(trim($_POST['frm_city'])) . "," . quote_smart(trim($_POST['frm_state'])) . "," . quote_smart(trim($_POST['frm_handle'])) . "," . quote_smart(trim($_POST['frm_icon_str'])) . "," . quote_smart(trim($_POST['frm_boundary'])) . "," . quote_smart(trim($_POST['frm_descr'])) . "," . quote_smart(trim($_POST['frm_capab'])) . "," . quote_smart(trim($_POST['frm_status_id'])) . "," . quote_smart(trim($_POST['frm_contact_name'])) . "," . quote_smart(trim($_POST['frm_contact_email'])) . "," . quote_smart(trim($_POST['frm_contact_phone'])) . "," . quote_smart(trim($_POST['frm_security_contact'])) . "," . quote_smart(trim($_POST['frm_security_email'])) . "," . quote_smart(trim($_POST['frm_security_phone'])) . "," . quote_smart(trim($_POST['frm_opening_hours'])) . "," . quote_smart(trim($_POST['frm_access_rules'])) . "," . quote_smart(trim($_POST['frm_security_reqs'])) . "," . quote_smart(trim($_POST['frm_pager_p'])) . "," . quote_smart(trim($_POST['frm_pager_s'])) . "," . $frm_lat . "," . $frm_lng . "," . quote_smart(trim($_POST['frm_type'])) . "," . quote_smart(trim($_SESSION['user_id'])) . "," . quote_smart(trim($now)) . ");";
    $result = mysql_query($query) or do_error($query, 'mysql_query() failed', mysql_error(), __FILE__, __LINE__);
    $new_id = mysql_insert_id();
    $status_id = $_POST['frm_status_id'];
    //4/14/11
    foreach ($_POST['frm_group'] as $grp_val) {
        // 6/10/11
        if (test_allocates($new_id, $grp_val, 3)) {
            $query_a = "INSERT INTO `{$GLOBALS['mysql_prefix']}allocates` (`group` , `type`, `al_as_of` , `al_status` , `resource_id` , `sys_comments` , `user_id`) VALUES \n\t\t\t\t\t({$grp_val}, 3, '{$now}', {$status_id}, {$new_id}, 'Allocated to Group' , {$by})";
            $result_a = mysql_query($query_a) or do_error($query_a, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
        }
    }
    do_log($GLOBALS['LOG_FACILITY_ADD'], 0, mysql_insert_id(), $_POST['frm_status_id']);
    //	2/17/11
    $caption = "<B>Facility  <i>" . stripslashes_deep($_POST['frm_name']) . "</i> data has been updated.</B><BR /><BR />";
    finished($caption);
    // wrap it up
}
// end if ($_getgoadd == 'true')
// add ===========================================================================================================================
// add ===========================================================================================================================
// add ===========================================================================================================================
if ($_getadd == 'true') {
    print do_calls();
    // call signs to JS array for validation
    ?>
		</HEAD>
		<BODY onLoad = "ck_frames();" onUnload="GUnload()">
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:facilities.php

示例5: do_notify

	function do_notify() {
		return;
		}			// end function do notify()
</SCRIPT>
<?php 
        }
        print "</HTML>";
        // 10/19/08
    }
    // end else ...
    // ________________________________________________________
    exit;
} else {
    if ($get_action == 'delete') {
        if (array_key_exists('confirm', $_GET)) {
            do_log($GLOBALS['LOG_PATIENT_DELETE'], $_GET['ticket_id'], 0, $_GET['id']);
            // 3/18/10
            //			($code, $ticket_id=0, $responder_id=0, $info="", $facility_id=0, $rec_facility_id=0, $mileage=0) {		// generic log table writer - 5/31/08, 10/6/09
            $query = "DELETE FROM `{$GLOBALS['mysql_prefix']}patient` WHERE `id`='{$_GET['id']}' LIMIT 1";
            $result = mysql_query($query) or do_error('', $query, mysql_error(), basename(__FILE__), __LINE__);
            ?>
<script>
setTimeout("document.next_Form.submit()",1500);
</script>
<?php 
            print "<FONT CLASS='header'>{$patient} record deleted</FONT><BR /><BR />";
        } else {
            $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}patient` WHERE `id`='{$_GET['id']}' LIMIT 1";
            $result = mysql_query($query) or do_error($query, $query, mysql_error(), basename(__FILE__), __LINE__);
            $row = stripslashes_deep(mysql_fetch_assoc($result));
            print "<FONT CLASS='header'>Really delete {$patient} record ' " . shorten($row['description'], 24) . "' ?</FONT><BR /><BR />";
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:patient_w.php

示例6: do_notify

	function do_notify() {
		return;
		}			// end function do notify()
</SCRIPT>
<?php 
        }
        print "</HTML>";
        // 10/19/08
    }
    // end else ...
    // ____________________________________________________
    exit;
} else {
    if ($get_action == 'delete') {
        if (array_key_exists('confirm', $_GET)) {
            do_log($GLOBALS['LOG_ACTION_DELETE'], $_GET['ticket_id'], 0, $_GET['id']);
            // 8/7/08
            //			($code, $ticket_id=0, $responder_id=0, $info="", $facility_id=0, $rec_facility_id=0, $mileage=0) {		// generic log table writer - 5/31/08, 10/6/09
            $result = mysql_query("DELETE FROM `{$GLOBALS['mysql_prefix']}action` WHERE `id`='{$_GET['id']}' LIMIT 1") or do_error('', 'mysql_query', mysql_error(), basename(__FILE__), __LINE__);
            print '<FONT CLASS="header">Action deleted</FONT><BR /><BR />';
            add_header($_GET['ticket_id']);
            show_ticket($_GET['ticket_id']);
        } else {
            $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}action` WHERE `id`='{$_GET['id']}' LIMIT 1";
            $result = mysql_query($query) or do_error($query, $query, mysql_error(), basename(__FILE__), __LINE__);
            $row = stripslashes_deep(mysql_fetch_assoc($result));
            print "<FONT CLASS='header'>Really delete action record '" . shorten($row['description'], 24) . "' ? </FONT><BR /><BR />";
            print "<FORM NAME='delfrm' METHOD='post' ACTION='action_w.php?action=delete&id={$_GET['id']}&ticket_id=" . $_GET['ticket_id'] . "&confirm=1'>";
            print "<INPUT TYPE='Submit' VALUE='Yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
            print "<INPUT TYPE='Button' VALUE='Cancel' onClick='history.back();'></FORM>";
        }
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:action_w.php

示例7: get_cast_mdata_pull

function get_cast_mdata_pull($ctx_age, $cast_mdata_ctx)
{
    $cast_name = $cast_mdata_ctx['name'];
    // sanity check - $cast_mdata_ctx['type'] MUST be "pull"
    assert($cast_mdata_ctx['type'] == "pull");
    do_log("slota");
    do_log("ctx_age=" . $ctx_age);
    do_log("cast_mdata_ctx=" . print_r($cast_mdata_ctx, true));
    // get the casti_srv_uri directly from $cast_mdata_ctx['arg'];
    $casti_srv_uri = $cast_mdata_ctx['arg'];
    // forward the xmlrpc to casti_srv_uri
    $client = new IXR_Client($casti_srv_uri);
    //	$client->debug	= true;
    if (!$client->query('get_cast_mdata', $cast_name)) {
        // delete the context file if it is now unreachable
        //		unlink(cast_name_to_filepath($cast_name));
        // forward the error to the caller
        return new IXR_Error($client->getErrorCode(), "slotaIXR" . $client->getErrorMessage());
    }
    // get the cast_mdata
    $cast_mdata = $client->getResponse();
    // return the $cast_mdata
    return $cast_mdata;
}
开发者ID:jeromeetienne,项目名称:neoip,代码行数:24,代码来源:cast_mdata_echo_server.php

示例8: log_info

function log_info($syslog_message)
{
    do_log($syslog_message, LOG_INFO);
}
开发者ID:alex1702,项目名称:poweradmin,代码行数:4,代码来源:toolkit.inc.php

示例9: check_couchdb

function check_couchdb($testhost)
{
    $host = false;
    $pingt = exec("fping  -t 30 " . $testhost);
    if ($pingt == $testhost . ' is alive') {
        $ret = json_decode(check_http('http://' . $testhost . ':5984', 2), TRUE);
        do_log("Check couchdb:" . $testhost . ":5984/", 'd', __FILE__, __FUNCTION__, __LINE__);
        if ($ret['couchdb'] == 'Welcome' && $ret['version'] == '1.1.1') {
            return $testhost;
        } else {
            do_log("FAILED couchdb:" . $testhost, '', __FILE__, __FUNCTION__, __LINE__);
        }
    } else {
        do_log("FAILED fping:" . $pingt . " -t 50 ip=" . $testhost, '', __FILE__, __FUNCTION__, __LINE__);
    }
    return false;
}
开发者ID:urueedi,项目名称:kazoo-regextern,代码行数:17,代码来源:functions.php

示例10: empty

    $ogts = empty($_POST['frm_ogts']) ? 0 : quote_smart(trim($_POST['frm_ogts']));
    $now = mysql_format_date(time() - get_variable('delta_mins') * 60);
    // 1/27/09
    $query = "INSERT INTO `{$GLOBALS['mysql_prefix']}responder` (\n\t\t\t`name`, `street`, `city`, `state`, `phone`, `handle`, `icon_str`, `description`, `capab`, `un_status_id`, `callsign`, `mobile`, `multi`, `aprs`, `instam`, `locatea`, `gtrack`, `glat`, `t_tracker`, `ogts`, `ring_fence`, `excl_zone`, `direcs`, `contact_name`, `contact_via`, `lat`, `lng`, `type`, `user_id`, `updated` )\n\t\t\tVALUES (" . quote_smart(trim($_POST['frm_name'])) . "," . quote_smart(trim($_POST['frm_street'])) . "," . quote_smart(trim($_POST['frm_city'])) . "," . quote_smart(trim($_POST['frm_state'])) . "," . quote_smart(trim($_POST['frm_phone'])) . "," . quote_smart(trim($_POST['frm_handle'])) . "," . quote_smart(trim($_POST['frm_icon_str'])) . "," . quote_smart(trim($_POST['frm_descr'])) . "," . quote_smart(trim($_POST['frm_capab'])) . "," . quote_smart(trim($_POST['frm_un_status_id'])) . "," . quote_smart(trim($_POST['frm_callsign'])) . "," . quote_smart(trim($_POST['frm_mobile'])) . "," . quote_smart(trim($_POST['frm_multi'])) . "," . quote_smart(trim($_POST['frm_aprs'])) . "," . quote_smart(trim($_POST['frm_instam'])) . "," . quote_smart(trim($_POST['frm_locatea'])) . "," . quote_smart(trim($_POST['frm_gtrack'])) . "," . quote_smart(trim($_POST['frm_glat'])) . "," . quote_smart(trim($_POST['frm_t_tracker'])) . "," . quote_smart(trim($_POST['frm_ogts'])) . "," . quote_smart(trim($_POST['frm_ringfence'])) . "," . quote_smart(trim($_POST['frm_excl_zone'])) . "," . quote_smart(trim($_POST['frm_direcs'])) . "," . quote_smart(trim($_POST['frm_contact_name'])) . "," . quote_smart(trim($_POST['frm_contact_via'])) . "," . $frm_lat . "," . $frm_lng . "," . quote_smart(trim($_POST['frm_type'])) . "," . quote_smart(trim($_SESSION['user_id'])) . "," . quote_smart(trim($now)) . ");";
    // 8/23/08, 5/11/11
    $result = mysql_query($query) or do_error($query, 'mysql_query() failed', mysql_error(), __FILE__, __LINE__);
    $new_id = mysql_insert_id();
    $status_id = $_POST['frm_un_status_id'];
    foreach ($_POST['frm_group'] as $grp_val) {
        // 6/10/11
        if (test_allocates($new_id, $grp_val, 2)) {
            $query_a = "INSERT INTO `{$GLOBALS['mysql_prefix']}allocates` (`group` , `type`, `al_as_of` , `al_status` , `resource_id` , `sys_comments` , `user_id`) VALUES \n\t\t\t\t\t\t({$grp_val}, 2, '{$now}', {$status_id}, {$new_id}, 'Allocated to Group' , {$by})";
            $result_a = mysql_query($query_a) or do_error($query_a, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
        }
    }
    do_log($GLOBALS['LOG_UNIT_STATUS'], 0, mysql_insert_id(), $_POST['frm_un_status_id']);
    // 6/2/08
    $caption = "<B>Unit  <i>" . stripslashes_deep($_POST['frm_name']) . "</i> data has been applied </B><BR /><BR />";
}
// end if ($_getgoadd == 'true')
// add ===========================================================================================================================
// add ===========================================================================================================================
// add ===========================================================================================================================
if ($_getadd == 'true') {
    print do_calls();
    // call signs to JS array for validation
    ?>
		</HEAD>
		<BODY onLoad = "ck_frames();" onUnload="GUnload()"> <!-- <?php 
    print __LINE__;
    ?>
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:units.php

示例11: error_reporting

<?php

/*
3/15/11 Created from as_up_un_status.php to allow change of facility status through situation screen 
*/
error_reporting(E_ALL);
//	file as_up_fac_status.php
@session_start();
require_once $_SESSION['fip'];
//snap(basename(__FILE__), __LINE__);
extract($_GET);
$now = time() - get_variable('delta_mins') * 60;
@session_start();
$query = "UPDATE `{$GLOBALS['mysql_prefix']}facilities` SET `status_id`= ";
$query .= quote_smart($frm_status_id);
$query .= ", `updated` = " . quote_smart(mysql_format_date($now));
$query .= ", `user_id` = " . $_SESSION['user_id'];
$query .= " WHERE `id` = ";
$query .= quote_smart($frm_responder_id);
$query .= " LIMIT 1";
$result = mysql_query($query) or do_error($query, "", mysql_error(), basename(__FILE__), __LINE__);
//	dump ($query);
do_log($GLOBALS['LOG_FACILITY_STATUS'], $frm_ticket_id, $frm_responder_id, $frm_status_id);
set_sess_exp();
// update session time
print date("H:i", $now);
//date("H:i", $row['as_of'])
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:27,代码来源:as_up_fac_status.php

示例12: saveConfig

 public function saveConfig()
 {
     do_log("hola mundo \n");
     $data = array();
     // notice that "ip_address" inputbox and "save" "restore" config buttons
     // are also received from console. just ignore it
     // search valid keys from http received parameters
     foreach (Config::$config_options as $key => $info) {
         if ($info[1] == true) {
             continue;
         }
         // ignoramos configuracion de sistema
         $type = $info[0];
         if ($info[0] == "c") {
             $type = "s";
         }
         if ($info[0] == "b") {
             $type = "i";
         }
         if (isset($_REQUEST[$key])) {
             $data[$key] = http_request($key, $type, $info[2]);
         }
     }
     // finally write file:
     $res = array_merge($this->config, $data);
     $result = $this->write_ini_file($res, AC_CONFIG_FILE);
     if ($result === FALSE) {
         return "Error al generar el fichero de configuracion";
     }
     return "";
 }
开发者ID:nedy13,项目名称:AgilityContest,代码行数:31,代码来源:Config.php

示例13: do_send

function do_send($to_str, $subject_str, $text_str)
{
    // 7/7/09
    global $istest;
    require_once 'smtp.inc.php';
    // defer load until required - 8/2/10
    $sleep = 4;
    // seconds delay between text messages
    $my_smtp_ary = explode("/", trim(get_variable('smtp_acct')));
    if (count($my_smtp_ary) > 1 && count($my_smtp_ary) != 6) {
        do_log($GLOBALS['LOG_ERROR'], 0, 0, "Invalid smtp account information: " . trim(get_variable('smtp_acct')));
        return;
    }
    if (count($my_smtp_ary) == 6 && !is_email(trim($my_smtp_ary[5]))) {
        // email format test
        do_log($GLOBALS['LOG_ERROR'], 0, 0, "Invalid smtp account address: " . trim($my_smtp_ary[5]));
        return;
    }
    if (!is_email(trim(get_variable('email_reply_to')))) {
        // email format test
        do_log($GLOBALS['LOG_ERROR'], 0, 0, "Invalid email reply-to: " . trim(get_variable('email_reply_to')));
        return;
    }
    function stripLabels($sText)
    {
        $labels = array("Incident:", "Priority:", "Nature:", "Addr:", "Descr:", "Reported by:", "Phone:", "Written:", "Updated:", "Status:", "Disp:", "Run Start:", "Map:", "Patient:", "Actions:", "Tickets host:");
        // 5/9/10
        for ($x = 0; $x < count($labels); $x++) {
            $sText = str_replace($labels[$x], '', $sText);
        }
        return $sText;
    }
    $to_array = array_values(array_unique(explode("|", $to_str)));
    // input is pipe-delimited string  - 10/17/08
    require_once "cell_addrs.inc.php";
    // 10/22/08
    $ary_cell_addrs = $ary_ll_addrs = array();
    for ($i = 0; $i < count($to_array); $i++) {
        // walk down the input address string/array
        $temp = explode("@", $to_array[$i]);
        //		if (in_array(trim(strtolower($temp[1])), $cell_addrs))  {				// cell addr?
        if (!in_array(trim(strtolower($temp[1])), $cell_addrs)) {
            // cell addr?
            array_push($ary_cell_addrs, $to_array[$i]);
            // yes
        } else {
            // no, land line addr
            array_push($ary_ll_addrs, $to_array[$i]);
        }
    }
    // end for ($i = ...)
    $caption = "";
    $my_from_ary = explode("/", trim(get_variable('email_from')));
    // note /B option
    $my_replyto_str = trim(get_variable('email_reply_to'));
    $count_cells = $count_ll = 0;
    // counters
    if (count($ary_ll_addrs) > 0) {
        // got landline addee's?
        //								  ($my_smtp_ary, $my_to_ary, $my_subject_str, $my_message_str, $my_from_ary, $my_replyto_str)
        if (count($my_smtp_ary) > 1) {
            $count_ll = do_swift_mail($my_smtp_ary, $ary_ll_addrs, $subject_str, $text_str, $my_from_ary, $my_replyto_str);
        } else {
            $count_ll = do_native_mail($my_smtp_ary, $ary_ll_addrs, $subject_str, $text_str, $my_from_ary, $my_replyto_str);
        }
    }
    if (count($ary_cell_addrs) > 0) {
        // got cell addee's?
        $lgth = 140;
        $ix = 0;
        $i = 1;
        $cell_text_str = stripLabels($text_str);
        // strip labels 5/10/10
        while (substr($cell_text_str, $ix, $lgth)) {
            // chunk to $lgth-length strings
            $subject_ex = $subject_str . "/part " . $i . "/";
            // 10/21/08
            //										 ($my_smtp_ary, $my_to_ary, $my_subject_str, $my_message_str, $my_from_ary, $my_replyto_str)
            if (count($my_smtp_ary) > 1) {
                $count_cells = do_swift_mail($my_smtp_ary, $ary_cell_addrs, $subject_ex, substr($cell_text_str, $ix, $lgth), $my_from_ary, $my_replyto_str);
            } else {
                $count_cells = do_native_mail($my_smtp_ary, $ary_cell_addrs, $subject_ex, substr($cell_text_str, $ix, $lgth), $my_from_ary, $my_replyto_str);
            }
            if ($i > 1) {
                sleep($sleep);
            }
            // 10/17/08
            $ix += $lgth;
            $i++;
        }
        // end while (substr($cell_text_...)
    }
    // end if (count($ary_cell_addrs)>0)
    return (string) ($count_ll + $count_cells);
}
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:95,代码来源:functions_mail.php

示例14: explode

<?php 
                    exit;
                    break;
                case 'do_del':
                    $temp = explode(",", $_POST['idstr'], 20);
                    for ($i = 0; $i < count($temp); $i++) {
                        $query = "DELETE from `{$GLOBALS['mysql_prefix']}ticket` WHERE `id` = " . $temp[$i] . " LIMIT 1";
                        $result = mysql_query($query) or do_error($query, 'mysql_query() failed', mysql_error(), __FILE__, __LINE__);
                        // 6/4/08 - corrected table names
                        $query = "DELETE from `{$GLOBALS['mysql_prefix']}action` WHERE `ticket_id` = " . $temp[$i];
                        $result = mysql_query($query) or do_error($query, 'mysql_query() failed', mysql_error(), __FILE__, __LINE__);
                        $query = "DELETE from `{$GLOBALS['mysql_prefix']}patient` WHERE `ticket_id` = " . $temp[$i];
                        $result = mysql_query($query) or do_error($query, 'mysql_query() failed', mysql_error(), __FILE__, __LINE__);
                        $query = "DELETE from `{$GLOBALS['mysql_prefix']}assigns` WHERE `ticket_id` = " . $temp[$i];
                        $result = mysql_query($query) or do_error($query, 'mysql_query() failed', mysql_error(), __FILE__, __LINE__);
                        do_log($GLOBALS['LOG_INCIDENT_DELETE'], $temp[$i]);
                        // added 6/4/08
                        //				dump ($query);
                    }
                    $plu = $i > 1 ? "s" : "";
                    ?>
				<DIV STYLE = 'margin-left:100px; margin-top:60px;'>
				<FORM NAME='can_Form' METHOD="post" ACTION = "<?php 
                    print basename(__FILE__);
                    ?>
">	
				<BR /><BR /><BR /><BR /><B>Ticket<?php 
                    print $plu;
                    ?>
 and associated Assigns, Action and <?php 
                    print $patient;
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:config.php

示例15: can_bid

function can_bid()
{
    do_log('bid');
    return get_logs('bid', bid_time) < 6;
}
开发者ID:mwcs01,项目名称:openpantry,代码行数:5,代码来源:log.lib.php


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