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


PHP oos_empty函数代码示例

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


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

示例1: __construct

    public function __construct($module = '')
    {
        global $aLang;

        if (defined('MODULE_SHIPPING_INSTALLED') && !oos_empty(MODULE_SHIPPING_INSTALLED)) {
            $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

            $include_modules = array();

            if ( (!empty($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['PHP_SELF'], (strrpos($_SERVER['PHP_SELF'], '.')+1)), $this->modules)) ) {
                $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['PHP_SELF'], (strrpos($_SERVER['PHP_SELF'], '.')+1)));
            } else {
                reset($this->modules);
                while (list(, $value) = each($this->modules)) {
                    $class = substr($value, 0, strrpos($value, '.'));
                    $include_modules[] = array('class' => $class, 'file' => $value);
                }
            }

            $sLanguage = oos_var_prep_for_os($_SESSION['language']);

            $nArrayCountModules = count($include_modules);
            for ($i=0, $n=$nArrayCountModules; $i<$n; $i++) {
                include 'includes/languages/' . $sLanguage . '/modules/shipping/' . $include_modules[$i]['file'];
                include 'includes/modules/shipping/' . $include_modules[$i]['file'];

                $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];
            }
        }
    }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:30,代码来源:class_shipping.php

示例2: oos_get_path

/**
 * Generate a path to categories
 *
 * @param $current_category_id
 * @return string
 */
function oos_get_path($current_category_id = '', $parent_id = '', $gparent_id = '')
{
    global $aCategoryPath;

    // Get database information
    $dbconn =& oosDBGetConn();
    $oostable =& oosDBGetTables();

    if (!empty($current_category_id)) {
        $cp_size = count($aCategoryPath);
        if ($cp_size == 0) {
            $categories_new = $current_category_id;
        } else {
            $categories_new = '';
            if (oos_empty($parent_id) || oos_empty($gparent_id) ) {
                $categoriestable = $oostable['categories'];
                $query = "SELECT c.parent_id, p.parent_id as gparent_id
                          FROM $categoriestable AS c,
                               $categoriestable AS p
                         WHERE c.categories_id = '" . intval($aCategoryPath[($cp_size-1)]) . "'
                           AND p.categories_id = '" . intval($current_category_id) . "'";
                $parent_categories = $dbconn->GetRow($query);

                $gparent_id = $parent_categories['gparent_id'];
                $parent_id = $parent_categories['parent_id'];
            }
            if ($parent_id == $gparent_id) {
                for ($i=0; $i < ($cp_size - 1); $i++) {
                    $categories_new .= '_' . $aCategoryPath[$i];
                }
            } else {
                for ($i=0; $i < $cp_size; $i++) {
                    $categories_new .= '_' . $aCategoryPath[$i];
                }
            }
            $categories_new .= '_' . $current_category_id;

            if (substr($categories_new, 0, 1) == '_') {
                $categories_new = substr($categories_new, 1);
            }
        }
    } else {
        $categories_new = implode('_', $aCategoryPath);
    }

    return 'categories=' . $categories_new;
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:53,代码来源:function_default.php

示例3: __construct

    public function __construct()
    {
        global $aLang;

        if (defined('MODULE_ORDER_TOTAL_INSTALLED') && !oos_empty(MODULE_ORDER_TOTAL_INSTALLED)) {
            $this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED);

            $sLanguage = oos_var_prep_for_os($_SESSION['language']);

            reset($this->modules);
            while (list(, $value) = each($this->modules)) {
                include 'includes/languages/' . $sLanguage . '/modules/order_total/' . $value;
                include 'includes/modules/order_total/' . $value;

                $class = substr($value, 0, strrpos($value, '.'));
                $GLOBALS[$class] = new $class;
            }
        }
    }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:19,代码来源:class_order_total.php

示例4: send

 function send($newsletter_id)
 {
     $audience = array();
     // Get database information
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     if ($_POST['global'] == 'true') {
         $products_result = $dbconn->Execute("SELECT distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address FROM " . $oostable['customers'] . " c, " . $oostable['products_notifications'] . " pn WHERE c.customers_id = pn.customers_id");
         while ($products = $products_result->fields) {
             $audience[$products['customers_id']] = array('firstname' => $products['customers_firstname'], 'lastname' => $products['customers_lastname'], 'email_address' => $products['customers_email_address']);
             // Move that ADOdb pointer!
             $products_result->MoveNext();
         }
         $customers_result = $dbconn->Execute("SELECT c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address FROM " . $oostable['customers'] . " c, " . $oostable['customers_info'] . " ci WHERE c.customers_id = ci.customers_info_id AND ci.global_product_notifications = '1'");
         while ($customers = $customers_result->fields) {
             $audience[$customers['customers_id']] = array('firstname' => $customers['customers_firstname'], 'lastname' => $customers['customers_lastname'], 'email_address' => $customers['customers_email_address']);
             // Move that ADOdb pointer!
             $customers_result->MoveNext();
         }
     } else {
         $chosen = $_POST['chosen'];
         $ids = implode(',', $chosen);
         $products_result = $dbconn->Execute("SELECT distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address FROM " . $oostable['customers'] . " c, " . $oostable['products_notifications'] . " pn WHERE c.customers_id = pn.customers_id AND pn.products_id in (" . $ids . ")");
         while ($products = $products_result->fields) {
             $audience[$products['customers_id']] = array('firstname' => $products['customers_firstname'], 'lastname' => $products['customers_lastname'], 'email_address' => $products['customers_email_address']);
             // Move that ADOdb pointer!
             $products_result->MoveNext();
         }
         $customers_result = $dbconn->Execute("SELECT c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address FROM " . $oostable['customers'] . " c, " . $oostable['customers_info'] . " ci WHERE c.customers_id = ci.customers_info_id AND ci.global_product_notifications = '1'");
         while ($customers = $customers_result->fields) {
             $audience[$customers['customers_id']] = array('firstname' => $customers['customers_firstname'], 'lastname' => $customers['customers_lastname'], 'email_address' => $customers['customers_email_address']);
             // Move that ADOdb pointer!
             $customers_result->MoveNext();
         }
     }
     $send_mail = new PHPMailer();
     $send_mail->PluginDir = OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/';
     $sLang = isset($_SESSION['iso_639_1']) ? $_SESSION['iso_639_1'] : 'en';
     $send_mail->SetLanguage($sLang, OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/language/');
     $send_mail->CharSet = CHARSET;
     $send_mail->IsMail();
     $send_mail->From = STORE_OWNER_EMAIL_ADDRESS;
     $send_mail->FromName = STORE_OWNER;
     $send_mail->Mailer = EMAIL_TRANSPORT;
     // Add smtp values if needed
     if (EMAIL_TRANSPORT == 'smtp') {
         $send_mail->IsSMTP();
         // set mailer to use SMTP
         $send_mail->SMTPAuth = OOS_SMTPAUTH;
         // turn on SMTP authentication
         $send_mail->Username = OOS_SMTPUSER;
         // SMTP username
         $send_mail->Password = OOS_SMTPPASS;
         // SMTP password
         $send_mail->Host = OOS_SMTPHOST;
         // specify main and backup server
     } else {
         // Set sendmail path
         if (EMAIL_TRANSPORT == 'sendmail') {
             if (!oos_empty(OOS_SENDMAIL)) {
                 $send_mail->Sendmail = OOS_SENDMAIL;
                 $send_mail->IsSendmail();
             }
         }
     }
     $send_mail->Subject = $this->title;
     reset($audience);
     while (list($key, $value) = each($audience)) {
         $send_mail->Body = $this->content;
         $send_mail->AddAddress($value['email_address'], $value['firstname'] . ' ' . $value['lastname']);
         $send_mail->Send();
         // Clear all addresses and attachments for next loop
         $send_mail->ClearAddresses();
         $send_mail->ClearAttachments();
     }
     $newsletter_id = oos_db_prepare_input($newsletter_id);
     $dbconn->Execute("UPDATE " . $oostable['newsletters'] . " SET date_sent = '" . date("Y-m-d H:i:s", time()) . "', status = '1' WHERE newsletters_id = '" . oos_db_input($newsletter_id) . "'");
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:78,代码来源:product_notification.php

示例5: isset

    }
    return $campaigns_array;
}
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (!empty($action)) {
    switch ($action) {
        case 'insert':
        case 'save':
            $campaigns_id = oos_db_prepare_input($_GET['cID']);
            $languages = oos_get_languages();
            for ($i = 0, $n = count($languages); $i < $n; $i++) {
                $campaigns_name_array = $_POST['campaigns_name'];
                $lang_id = $languages[$i]['id'];
                $sql_data_array = array('campaigns_name' => oos_db_prepare_input($campaigns_name_array[$lang_id]));
                if ($action == 'insert') {
                    if (oos_empty($campaigns_id)) {
                        $campaignstable = $oostable['campaigns'];
                        $next_id_result = $dbconn->Execute("SELECT max(campaigns_id) as campaigns_id FROM {$campaignstable}");
                        $next_id = $next_id_result->fields;
                        $campaigns_id = $next_id['campaigns_id'] + 1;
                    }
                    $insert_sql_data = array('campaigns_id' => $campaigns_id, 'campaigns_languages_id' => $lang_id);
                    $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
                    oos_db_perform($oostable['campaigns'], $sql_data_array);
                } elseif ($action == 'save') {
                    oos_db_perform($oostable['campaigns'], $sql_data_array, 'update', "campaigns_id = '" . oos_db_input($campaigns_id) . "' and campaigns_languages_id = '" . intval($lang_id) . "'");
                }
            }
            if (isset($_POST['default']) && $_POST['default'] == 'on') {
                $configurationtable = $oostable['configuration'];
                $dbconn->Execute("UPDATE {$configurationtable} SET configuration_value = '" . oos_db_input($campaigns_id) . "' WHERE configuration_key = 'DEFAULT_CAMPAIGNS_ID'");
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:campaigns.php

示例6: VALUES

 // Add smtp values if needed
 if (EMAIL_TRANSPORT == 'smtp') {
     $send_mail->IsSMTP();
     // set mailer to use SMTP
     $send_mail->SMTPAuth = OOS_SMTPAUTH;
     // turn on SMTP authentication
     $send_mail->Username = OOS_SMTPUSER;
     // SMTP username
     $send_mail->Password = OOS_SMTPPASS;
     // SMTP password
     $send_mail->Host = OOS_SMTPHOST;
     // specify main and backup server
 } else {
     // Set sendmail path
     if (EMAIL_TRANSPORT == 'sendmail') {
         if (!oos_empty(OOS_SENDMAIL)) {
             $send_mail->Sendmail = OOS_SENDMAIL;
             $send_mail->IsSendmail();
         }
     }
 }
 $send_mail->Subject = $subject;
 $send_mail->Body = $message;
 $send_mail->AddAddress($_POST['email_to'], 'Friend');
 $send_mail->Send();
 $send_mail->ClearAddresses();
 $send_mail->ClearAttachments();
 // Now create the coupon email entry
 $couponstable = $oostable['coupons'];
 $insert_result = $dbconn->Execute("INSERT INTO {$couponstable} (coupon_code, coupon_type, coupon_amount, date_created) VALUES ('" . $id1 . "', 'G', '" . $_POST['amount'] . "', '" . date("Y-m-d H:i:s", time()) . "')");
 $insert_id = $dbconn->Insert_ID();
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:gv_mail.php

示例7: oos_mail

  /**
   * Mail function (uses phpMailer)
   */
  function oos_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {


    if (preg_match('~[\r\n]~', $to_name)) return false;
    if (preg_match('~[\r\n]~', $to_email_address)) return false;
    if (preg_match('~[\r\n]~', $email_subject)) return false;
    if (preg_match('~[\r\n]~', $from_email_name)) return false;
    if (preg_match('~[\r\n]~', $from_email_address)) return false;

    $sLang = (isset($_SESSION['iso_639_1']) ? $_SESSION['iso_639_1'] : 'en');

    // Instantiate a new mail object
    $mail = new PHPMailer;

    $mail->PluginDir = OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/';
    $mail->SetLanguage( $sLang, OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/language/' );

    $mail->CharSet = CHARSET;
    $mail->IsMail();

    $mail->From = $from_email_address ? $from_email_address : STORE_OWNER_EMAIL_ADDRESS;
    $mail->FromName = $from_email_name ? $from_email_name : STORE_OWNER;
    $mail->Mailer = EMAIL_TRANSPORT;

    // Add smtp values if needed
    if ( EMAIL_TRANSPORT == 'smtp' ) {
      $mail->IsSMTP(); // set mailer to use SMTP
      $mail->SMTPAuth = OOS_SMTPAUTH; // turn on SMTP authentication
      $mail->Username = OOS_SMTPUSER; // SMTP username
      $mail->Password = OOS_SMTPPASS; // SMTP password
      $mail->Host     = OOS_SMTPHOST; // specify main and backup server
    } else
      // Set sendmail path
      if ( EMAIL_TRANSPORT == 'sendmail' ) {
        if (!oos_empty(OOS_SENDMAIL)) {
          $mail->Sendmail = OOS_SENDMAIL;
          $mail->IsSendmail();
        }
    }


    $mail->AddAddress($to_email_address, $to_name);
    $mail->Subject = $email_subject;


    // Build the text version
    $text = strip_tags($email_text);
    if (EMAIL_USE_HTML == '1') {
      $mail->IsHTML(true);
      $mail->Body = $email_text;
      $mail->AltBody = $text;
    } else {
      $mail->Body = $text;
    }

    // Send message
    $mail->Send();
  }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:61,代码来源:function_kernel.php

示例8: switch

  $action = (isset($_GET['action']) ? $_GET['action'] : '');

  if (!empty($action)) {
    switch ($action) {
      case 'insert':
      case 'save':
        $ticket_priority_id = oos_db_prepare_input($_GET['oID']);

        $languages = oos_get_languages();
        $ticket_priority_name_array = $_POST['ticket_priority_name'];
        for ($i = 0; $i < count($languages); $i++) {
          $lang_id = $languages[$i]['id'];
          $sql_data_array = array('ticket_priority_name' => oos_db_prepare_input($ticket_priority_name_array[$lang_id]));

          if ($action == 'insert') {
            if (oos_empty($ticket_priority_id)) {
              $ticket_prioritytable = $oostable['ticket_priority'];
              $next_id_result = $dbconn->Execute("SELECT max(ticket_priority_id) as ticket_priority_id FROM $ticket_prioritytable");
              $next_id = $next_id_result->fields;
              $ticket_priority_id = $next_id['ticket_priority_id'] + 1;
            }

            $insert_sql_data = array('ticket_priority_id' => $ticket_priority_id,
                                     'ticket_languages_id' => $lang_id);

            $sql_data_array = array_merge($sql_data_array, $insert_sql_data);

            oos_db_perform($oostable['ticket_priority'], $sql_data_array);
          } elseif ($action == 'save') {
            oos_db_perform($oostable['ticket_priority'], $sql_data_array, 'update', "ticket_priority_id = '" . oos_db_input($ticket_priority_id) . "' and ticket_languages_id = '" . intval($lang_id) . "'");
          }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:ticket_priority.php

示例9: oos_mail

/**
  * Mail function (uses phpMailer)
 */
function oos_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $add_attachment = false)
{

    global $oEvent;

    if (!$oEvent->installed_plugin('mail')) return false;

    if (preg_match('~[\r\n]~', $to_name)) return false;
    if (preg_match('~[\r\n]~', $to_email_address)) return false;
    if (preg_match('~[\r\n]~', $email_subject)) return false;
    if (preg_match('~[\r\n]~', $from_email_name)) return false;
    if (preg_match('~[\r\n]~', $from_email_address)) return false;

    $sLang = (isset($_SESSION['iso_639_1']) ? $_SESSION['iso_639_1'] : 'en');

    // require  the mail classes
    MyOOS_CoreApi::requireOnce('lib/phpmailer/class.phpmailer.php');

    // Instantiate a new mail object
    $mail = new PHPMailer;
    $mail->ClearAllRecipients();
    $mail->ClearAddresses();
    $mail->ClearAttachments();

    $mail->PluginDir = OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/';
    $mail->SetLanguage( $sLang, OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/language/' );

    $mail->CharSet = CHARSET;
    $mail->IsMail();

    $mail->From = $from_email_address ? $from_email_address : STORE_OWNER_EMAIL_ADDRESS;
    $mail->FromName = $from_email_name ? $from_email_name : STORE_OWNER;
    $mail->Mailer = EMAIL_TRANSPORT;

    // Add smtp values if needed
    if ( EMAIL_TRANSPORT == 'smtp' ) {
        $mail->IsSMTP(); // set mailer to use SMTP
        $mail->SMTPAuth = OOS_SMTPAUTH; // turn on SMTP authentication
        $mail->Username = OOS_SMTPUSER; // SMTP username
        $mail->Password = OOS_SMTPPASS; // SMTP password
        $mail->Host     = OOS_SMTPHOST; // specify main and backup server
    } else
        // Set sendmail path
        if ( EMAIL_TRANSPORT == 'sendmail' ) {
            if (!oos_empty(OOS_SENDMAIL)) {
               $mail->Sendmail = OOS_SENDMAIL;
               $mail->IsSendmail();
             }
    }


    $mail->AddAddress($to_email_address, $to_name);
    $mail->Subject = $email_subject;


    // Build the text version
    $text = strip_tags($email_text);
    if (EMAIL_USE_HTML == '1') {
        $mail->IsHTML(true);
        $mail->Body = $email_text;
        $mail->AltBody = $text;
    } else {
        $mail->Body = $text;
    }

    if ($add_attachment === true) {

        // Get database information
        $dbconn =& oosDBGetConn();
        $oostable =& oosDBGetTables();

        $files_uploadedtable = $oostable['files_uploaded'];
        $query = "SELECT files_uploaded_id, files_uploaded_name
                  FROM $files_uploadedtable
                  WHERE sesskey = '" . oos_session_id() . "'";
        $files_uploaded_result = $dbconn->Execute($query);

        if ($files_uploaded_result->RecordCount() > 0) {
            while ($files_uploaded = $files_uploaded_result->fields)
            {

                $sDir = OOS_UPLOADS;
                if (substr($sDir, -1) != '/') $sDir .= '/';
                $sFile = $sDir. $files_uploaded['files_uploaded_id'] . $files_uploaded['files_uploaded_name'];
                $mail->AddAttachment($sFile, $files_uploaded['files_uploaded_name']);

                // Move that ADOdb pointer!
               $files_uploaded_result->MoveNext();
            }
        }
    }


    // Send message
    $mail->Send();
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:99,代码来源:function_kernel.php

示例10: oos_hide_session_id

 /**
  * Hide form elements
  */
  function oos_hide_session_id() {
    if (defined('SID') && !oos_empty(SID)) return oos_draw_hidden_field(oos_session_name(), oos_session_id());
  }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:6,代码来源:function_output.php

示例11: isset

    $newsfeed_categories_result->Close();
    return $newsfeed_categories_array;
}
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (!empty($action)) {
    switch ($action) {
        case 'insert':
        case 'save':
            $newsfeed_categories_id = oos_db_prepare_input($_GET['ncID']);
            $languages = oos_get_languages();
            for ($i = 0, $n = count($languages); $i < $n; $i++) {
                $newsfeed_categories_name_array = $_POST['newsfeed_categories_name'];
                $lang_id = $languages[$i]['id'];
                $sql_data_array = array('newsfeed_categories_name' => oos_db_prepare_input($newsfeed_categories_name_array[$lang_id]));
                if ($action == 'insert') {
                    if (oos_empty($newsfeed_categories_id)) {
                        $newsfeed_categoriestable = $oostable['newsfeed_categories'];
                        $next_id_result = $dbconn->Execute("SELECT max(newsfeed_categories_id) as newsfeed_categories_id FROM {$newsfeed_categoriestable}");
                        $next_id = $next_id_result->fields;
                        $newsfeed_categories_id = $next_id['newsfeed_categories_id'] + 1;
                    }
                    $insert_sql_data = array('newsfeed_categories_id' => $newsfeed_categories_id, 'newsfeed_categories_languages_id' => $lang_id);
                    $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
                    oos_db_perform($oostable['newsfeed_categories'], $sql_data_array);
                } elseif ($action == 'save') {
                    oos_db_perform($oostable['newsfeed_categories'], $sql_data_array, 'update', "newsfeed_categories_id = '" . oos_db_input($newsfeed_categories_id) . "' and newsfeed_categories_languages_id = '" . intval($lang_id) . "'");
                }
            }
            if (isset($_POST['default']) && $_POST['default'] == 'on') {
                $configurationtable = $oostable['configuration'];
                $dbconn->Execute("UPDATE {$configurationtable} SET configuration_value = '" . oos_db_input($newsfeed_categories_id) . "' WHERE configuration_key = 'DEFAULT_NEWSFEED_CATEGOREIS_ID'");
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:newsfeed_categories.php

示例12: define

   ---------------------------------------------------------------------- */
define('OOS_VALID_MOD', 'yes');
require 'includes/oos_main.php';
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (!empty($action)) {
    switch ($action) {
        case 'insert':
        case 'save':
            $ticket_admin_id = oos_db_prepare_input($_GET['oID']);
            $languages = oos_get_languages();
            $ticket_admin_name_array = $_POST['ticket_admin_name'];
            for ($i = 0; $i < count($languages); $i++) {
                $lang_id = $languages[$i]['id'];
                $sql_data_array = array('ticket_admin_name' => oos_db_prepare_input($ticket_admin_name_array[$lang_id]));
                if ($action == 'insert') {
                    if (oos_empty($ticket_admin_id)) {
                        $ticket_adminstable = $oostable['ticket_admins'];
                        $next_id_result = $dbconn->Execute("SELECT max(ticket_admin_id) as ticket_admin_id FROM {$ticket_adminstable}");
                        $next_id = $next_id_result->fields;
                        $ticket_admin_id = $next_id['ticket_admin_id'] + 1;
                    }
                    $insert_sql_data = array('ticket_admin_id' => $ticket_admin_id, 'ticket_languages_id' => $lang_id);
                    $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
                    oos_db_perform($oostable['ticket_admins'], $sql_data_array);
                } elseif ($action == 'save') {
                    oos_db_perform($oostable['ticket_admins'], $sql_data_array, 'update', "ticket_admin_id = '" . oos_db_input($ticket_admin_id) . "' and ticket_languages_id = '" . intval($lang_id) . "'");
                }
            }
            if (isset($_POST['default']) && $_POST['default'] == 'on') {
                $configurationtable = $oostable['configuration'];
                $dbconn->Execute("UPDATE {$configurationtable} SET configuration_value = '" . oos_db_input($ticket_admin_id) . "' WHERE configuration_key = 'TICKET_DEFAULT_ADMIN_ID'");
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:ticket_admin.php

示例13: define

define('OOS_VALID_MOD', 'yes');
require 'includes/oos_main.php';
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (!empty($action)) {
    switch ($action) {
        case 'insert':
        case 'save':
            $ticket_reply_id = oos_db_prepare_input($_GET['oID']);
            $languages = oos_get_languages();
            $ticket_reply_name_array = $_POST['ticket_reply_name'];
            $ticket_reply_text_array = $_POST['ticket_reply_text'];
            for ($i = 0; $i < count($languages); $i++) {
                $lang_id = $languages[$i]['id'];
                $sql_data_array = array('ticket_reply_name' => oos_db_prepare_input($ticket_reply_name_array[$lang_id]), 'ticket_reply_text' => oos_db_prepare_input($ticket_reply_text_array[$lang_id]));
                if ($action == 'insert') {
                    if (oos_empty($ticket_reply_id)) {
                        $ticket_replytable = $oostable['ticket_reply'];
                        $next_id_result = $dbconn->Execute("SELECT max(ticket_reply_id) as ticket_reply_id FROM {$ticket_replytable}");
                        $next_id = $next_id_result->fields;
                        $ticket_reply_id = $next_id['ticket_reply_id'] + 1;
                    }
                    $insert_sql_data = array('ticket_reply_id' => $ticket_reply_id, 'ticket_languages_id' => $lang_id);
                    $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
                    oos_db_perform($oostable['ticket_reply'], $sql_data_array);
                } elseif ($action == 'save') {
                    oos_db_perform($oostable['ticket_reply'], $sql_data_array, 'update', "ticket_reply_id = '" . oos_db_input($ticket_reply_id) . "' and ticket_languages_id = '" . intval($lang_id) . "'");
                }
            }
            if (isset($_POST['default']) && $_POST['default'] == 'on') {
                $configurationtable = $oostable['configuration'];
                $dbconn->Execute("UPDATE {$configurationtable} SET configuration_value = '" . oos_db_input($ticket_reply_id) . "' WHERE configuration_key = 'TICKET_DEFAULT_REPLY_ID'");
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:ticket_reply.php

示例14: urlencode

    $sPingUrl = "http://www.google.com/webmasters/sitemaps/ping?sitemap=" . urlencode($pingUrl);
    $pingres = MyOOS_Utilities::RemoteOpen($sPingUrl);
									  
    if ($pingres == NULL || $pingres === false) {
         trigger_error("Failed to ping Google: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE);
    }
				
    //Ping Ask.com
    $sPingUrl = "http://submissions.ask.com/ping?sitemap=" . urlencode($pingUrl);
    $pingres = MyOOS_Utilities::RemoteOpen($sPingUrl);
    if ($pingres == NULL || $pingres === false || strpos($pingres,"successfully received and added")===false) { //Ask.com returns 200 OK even if there was an error, so we need to check the content.
        trigger_error("Failed to ping Ask.com: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE);
    }

    //Ping YAHOO
    if (!oos_empty(YAHOOKEY)) {
        $sPingUrl = "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=" . YAHOOKEY . "&url=" . urlencode($pingUrl);
        $pingres = MyOOS_Utilities::RemoteOpen($sPingUrl);
        if ($pingres==NULL || $pingres===false || strpos(strtolower($pingres),"success")===false) {
            trigger_error("Failed to ping YAHOO: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE);
        }
	  }
	  
    //Ping Bing
    $sPingUrl = "http://www.bing.com/webmaster/ping.aspx?siteMap=" . urlencode($pingUrl);
    $pingres = MyOOS_Utilities::RemoteOpen($sPingUrl);
    if ($pingres==NULL || $pingres===false || strpos($pingres,"Thanks for submitting your sitemap")===false) {
        trigger_error("Failed to ping Bing: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE);
    }
	
} else {
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:cron_sitemap.php

示例15: isset

    $page_type_result->Close();
    return $page_type_array;
}
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (!empty($action)) {
    switch ($action) {
        case 'insert':
        case 'save':
            $page_type_id = oos_db_prepare_input($_GET['ptID']);
            $languages = oos_get_languages();
            for ($i = 0, $n = count($languages); $i < $n; $i++) {
                $page_type_name_array = $_POST['page_type_name'];
                $lang_id = $languages[$i]['id'];
                $sql_data_array = array('page_type_name' => oos_db_prepare_input($page_type_name_array[$lang_id]));
                if ($action == 'insert') {
                    if (oos_empty($page_type_id)) {
                        $next_id_result = $dbconn->Execute("SELECT max(page_type_id) as page_type_id FROM " . $oostable['page_type'] . "");
                        $next_id = $next_id_result->fields;
                        $page_type_id = $next_id['page_type_id'] + 1;
                    }
                    $insert_sql_data = array('page_type_id' => $page_type_id, 'page_type_languages_id' => $lang_id);
                    $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
                    oos_db_perform($oostable['page_type'], $sql_data_array);
                } elseif ($action == 'save') {
                    oos_db_perform($oostable['page_type'], $sql_data_array, 'update', "page_type_id = '" . oos_db_input($page_type_id) . "' and page_type_languages_id = '" . intval($lang_id) . "'");
                }
            }
            oos_redirect_admin(oos_href_link_admin($aFilename['content_page_type'], 'page=' . $_GET['page'] . '&ptID=' . $page_type_id));
            break;
        case 'deleteconfirm':
            $ptID = oos_db_prepare_input($_GET['ptID']);
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:content_page_type.php


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