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


PHP aporeplace函数代码示例

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


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

示例1: replace_glossary_tag

 function replace_glossary_tag($matches)
 {
     global $content;
     $inner = trim($matches[2]);
     // search keyword in glossary table
     $keyword = trim($matches[1]);
     if ($keyword !== '') {
         $keyword = html_entity_decode($keyword, ENT_QUOTES, PHPWCMS_CHARSET);
         // check against cache
         if (!isset($content['glossary_cache'][$keyword])) {
             $like = aporeplace($keyword);
             $where = 'glossary_status=1 AND glossary_highlight=1 AND (';
             $where .= "glossary_keyword LIKE '" . $like . "' OR ";
             $where .= "glossary_keyword LIKE '" . $like . ",%' OR ";
             $where .= "glossary_keyword LIKE '%, " . $like . ",%' OR ";
             $where .= "glossary_keyword LIKE '%, " . $like . "'";
             $where .= ')';
             // retrieve only single keyword that matches best
             $entry = _dbGet('phpwcms_glossary', 'glossary_title, glossary_keyword, glossary_text, COUNT(glossary_id) AS count_all', $where, 'glossary_id', 'count_all DESC', '1');
             if (isset($entry[0])) {
                 // get keywords to store each in cache
                 $keywords = convertStringToArray($entry[0]['glossary_keyword']);
                 $title = empty($entry[0]['glossary_title']) ? $inner : html($entry[0]['glossary_title']);
                 $text = trim(clean_slweg($entry[0]['glossary_text']));
                 // store glossary item in cache
                 foreach ($keywords as $key) {
                     $content['glossary_cache'][$key] = array('title' => $title, 'text' => $text);
                 }
             }
         }
         // create ABBR
         if (isset($content['glossary_cache'][$keyword])) {
             $inner = '<abbr class="glossary" title="' . $content['glossary_cache'][$keyword]['title'] . ' :: ' . $content['glossary_cache'][$keyword]['text'] . '">' . $inner . '</abbr>';
         }
     }
     return $inner;
 }
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:37,代码来源:frontend.render.php

示例2: unset

        if (isset($all[$key]['article_image']['prev']) && !empty($all[$key]['article_image']['id'])) {
            //dumpVar($all[$key]);
            unset($all[$key]['article_image']['prev']);
            unset($all[$key]['article_image']['prev_info']);
            unset($all[$key]['article_image']['prev_make']);
            unset($all[$key]['article_image']['add']);
            unset($all[$key]['article_image']['cname']);
            $all[$key]['article_image']['id'] = intval($all[$key]['article_image']['id']);
            // retrieve image information
            $file = _dbQuery("SELECT f_id, f_hash, f_ext FROM " . DB_PREPEND . "phpwcms_file WHERE f_id=" . $all[$key]['article_image']['id'] . " LIMIT 1");
            if (!empty($file[0]['f_id']) && $file[0]['f_id'] == $all[$key]['article_image']['id']) {
                $all[$key]['article_image']['hash'] = $file[0]['f_hash'];
                $all[$key]['article_image']['ext'] = $file[0]['f_ext'];
                $all[$key]['article_image']['list_usesummary'] = 1;
                $sql = "UPDATE " . DB_PREPEND . "phpwcms_article SET ";
                $sql .= "article_image = '" . aporeplace(serialize($all[$key]['article_image'])) . "',";
                $sql .= "article_tstamp = '" . $all[$key]['article_tstamp'] . "' WHERE article_id = " . $all[$key]['article_id'] . " LIMIT 1";
                $result = _dbQuery($sql, 'UPDATE');
                echo '<pre';
                if ($result === false) {
                    echo ' style="color:#CC3300"';
                }
                echo '>[ID:' . sprintf('%04s', $all[$key]['article_id']) . '] ' . html_specialchars($all[$key]['article_title']);
                echo '</pre>' . LF;
            }
        } else {
            unset($all[$key]);
        }
    }
}
?>
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:upgrade_articleimg.php

示例3: csvFileToArray

     $_userInfo['csv'] = csvFileToArray($_FILES['cvsfile']['tmp_name'], $_userInfo['delimeter']);
     if (is_array($_userInfo['csv'])) {
         $_userInfo['nonImported'] = array();
         $c = 1;
         $_userInfo['csvTime'] = time();
         foreach ($_userInfo['csv'] as $row) {
             if (!isset($row[1])) {
                 $row[1] = '';
             }
             if (!empty($row[0]) && is_valid_email($row[0])) {
                 $sql = "INSERT INTO " . DB_PREPEND . "phpwcms_address (";
                 $sql .= "address_email, address_name, address_key, address_subscription, address_verified, address_tstamp) VALUES (";
                 $sql .= "'" . aporeplace($row[0]) . "', ";
                 $sql .= "'" . aporeplace($row[1]) . "', ";
                 $sql .= "'" . aporeplace(shortHash($row[0] . time())) . "', ";
                 $sql .= "'" . ($_userInfo['subscribe_all'] ? '' : aporeplace(serialize($_userInfo['subscribe_select']))) . "', ";
                 $sql .= $_userInfo['subscribe_active'] . ", FROM_UNIXTIME(" . $_userInfo['csvTime'] . ") )";
                 $sql = _dbQuery($sql, 'INSERT');
                 if (empty($sql['INSERT_ID'])) {
                     $_userInfo['nonImported'][$c] = $row[0] . '; ' . $row[1] . ' (' . mysql_error() . ')';
                 }
             } else {
                 $_userInfo['nonImported'][$c] = $row[0] . '; ' . $row[1];
             }
             $c++;
         }
     }
     break;
 default:
     $_userInfo['csvError'] = 'False MIME TYPE. Be sure to upload CSV file only.';
     @unlink($_FILES['cvsfile']['tmp_name']);
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:subscriberimport.form.inc.php

示例4: intval

    $media["media_width"] = intval($media["media"][3]);
    $media["media_height"] = intval($media["media"][4]);
    $media["media_auto"] = intval($media["media"][8]) ? 1 : 0;
    $media["media_transparent"] = isset($media["media"][9]) ? intval($media["media"][9]) : 0;
    $media["media_control"] = intval($media["media"][7]) ? 1 : 0;
    if ($media["media_src"]) {
        // remote Source
        $media["media_extern"] = base64_decode($media["media"][6]);
        $media["media_id"] = 0;
        $media["media_name"] = '';
    } else {
        //internal source
        list($media["media_id"], $media["media_name"]) = explode(':', base64_decode($media["media"][6]));
        $media["media_id"] = intval($media["media_id"]);
        $media["media_name"] = trim($media["media_name"]);
        $media["media_extern"] = '';
    }
    unset($media["media"]);
    $sql = "UPDATE " . DB_PREPEND . "phpwcms_articlecontent SET ";
    $sql .= "acontent_form='" . aporeplace(serialize($media)) . "', acontent_media='', ";
    $sql .= "acontent_created='" . $var["acontent_created"] . "', acontent_tstamp='" . $var["acontent_tstamp"] . "' ";
    $sql .= "WHERE acontent_id = " . $var["acontent_id"];
    $upgrade = _dbQuery($sql, 'UPDATE');
    echo sprintf('%05d: ', $c) . ' CP-ID: ' . $var['acontent_id'] . LF;
    flush();
    $c++;
}
if ($c == 1) {
    echo 'No content part multimedia found for upgrading!';
}
echo '</pre></body></html>';
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:upgrade_multimedia.php

示例5: sprintf

         if ($fileExt === '') {
             $file_error["file"] = sprintf($BL['be_fprivup_err9'], implode(', ', $phpwcms['allowed_upload_ext']));
         } elseif (is_array($phpwcms['allowed_upload_ext']) && count($phpwcms['allowed_upload_ext']) && !in_array(strtolower($fileExt), $phpwcms['allowed_upload_ext'])) {
             $file_error["file"] = sprintf($BL['be_fprivup_err8'], strtoupper($fileName), implode(', ', $phpwcms['allowed_upload_ext']));
         }
     }
 }
 if (empty($file_error)) {
     if (isset($file_vars)) {
         $fileVarsField = ',f_vars';
         $fileVarsValue = ',' . _dbEscape(serialize($file_vars));
     } else {
         $fileVarsField = '';
         $fileVarsValue = '';
     }
     $sql = "INSERT INTO " . DB_PREPEND . "phpwcms_file (" . "f_pid, f_uid, f_kid, f_aktiv, f_public, f_name, f_created, f_size, f_type, f_ext, " . "f_shortinfo, f_longinfo, f_keywords, f_hash, f_copyright, f_tags, f_granted, f_gallerystatus, f_sort" . $fileVarsField . ") VALUES (" . $file_pid . ", " . intval($_SESSION["wcs_user_id"]) . ", 1, " . $file_aktiv . ", " . $file_public . ", '" . $fileName . "', '" . time() . "', '" . $fileSize . "', '" . aporeplace($fileType) . "', '" . $fileExt . "', '" . aporeplace($file_shortinfo) . "', '" . aporeplace($file_longinfo) . "', '" . aporeplace($file_keys) . "', '" . aporeplace($fileHash) . "', '" . aporeplace($file_copyright) . "', '" . aporeplace($file_tags) . "', " . $file_granted . ", " . $file_gallerydownload . ", " . $file_sort . $fileVarsValue . ")";
     if ($result = mysql_query($sql, $db) or die("error while insert file information")) {
         $new_fileId = mysql_insert_id($db);
         //Festlegen der aktuellen File-ID
         $wcs_newfilename = $fileExt ? $fileHash . '.' . $fileExt : $fileHash;
         // changed for using hashed file names
         $useruploadpath = PHPWCMS_ROOT . $phpwcms["file_path"];
         $usernewfile = $useruploadpath . $wcs_newfilename;
         if ($dir = @opendir($useruploadpath)) {
             if (!@move_uploaded_file($_FILES["file"]["tmp_name"], $usernewfile)) {
                 $file_error["upload"] = $BL['be_fprivup_err3'] . ' (1)';
             }
         } else {
             $oldumask = umask(0);
             if (@mkdir($useruploadpath, 0777)) {
                 if (!@move_uploaded_file($_FILES["file"]["tmp_name"], $usernewfile)) {
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:files.private.upload.tmpl.php

示例6: clean_slweg

    }
    if (!empty($_POST["fkey_aktion"])) {
        //Formular zum Bearbeiten der Dateischlüssel-Namen
        $fkey["name"] = clean_slweg($_POST["fkey_name"], 250);
        $fkey["id"] = intval($_POST["fkey_id"]);
        $fkey["active"] = intval($_POST["fkey_active"]);
        $fkey["cid"] = intval($_POST["fkey_cid"]);
        $fkey["sort"] = empty($_POST["fkey_sort"]) ? 0 : intval($_POST["fkey_sort"]);
        if (isEmpty($fkey["name"])) {
            $fkey["error"] = 1;
        } else {
            if (!$fkey["id"]) {
                $sql = "INSERT INTO " . DB_PREPEND . "phpwcms_filekey (fkey_name, fkey_aktiv, fkey_cid, fkey_sort) VALUES ('";
                $sql .= aporeplace($fkey["name"]) . "', " . $fkey["active"] . ", " . $fkey["cid"] . ", " . $fkey["sort"] . ")";
            } else {
                $sql = "UPDATE " . DB_PREPEND . "phpwcms_filekey SET fkey_name='" . aporeplace($fkey["name"]);
                $sql .= "', fkey_aktiv=" . $fkey["active"] . ", fkey_cid=" . $fkey["cid"] . ", fkey_sort=" . $fkey["sort"] . " WHERE fkey_id=" . $fkey["id"];
            }
            if ($result = mysql_query($sql, $db) or die("error while inserting/updating file key")) {
                if (!$fkey["id"]) {
                    $fkey["id"] = mysql_insert_id($db);
                }
                headerRedirect(PHPWCMS_URL . "phpwcms.php?do=admin&p=7");
            }
        }
    }
    ?>
		  <form action="phpwcms.php?do=admin&amp;p=7&amp;fkeyid=<?php 
    echo $fkey["id"] . "&cid=" . $fkey["cid"];
    ?>
" method="post" name="filekey" id="filekey">
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:admin.filecat.tmpl.php

示例7: isset

            $newimage .= $frow['f_hash'];
            $newimage .= ':';
            $newimage .= $frow['f_ext'];
            $newimage .= ':';
            $newimage .= $image[3];
            $newimage .= ':';
            $newimage .= $image[4];
            $newimage .= ':';
            $newimage .= $image[7];
            $newimage .= ':';
            $newimage .= $image[5];
            $newimage .= ':';
            $newimage .= isset($image[8]) && intval($image[8]) ? 1 : 0;
            // check if this is an updated content part
            if ($image[2] != $frow['f_hash'] && $image[3] != $frow['f_ext']) {
                $usql = "UPDATE " . DB_PREPEND . "phpwcms_articlecontent SET ";
                $usql .= "acontent_image='" . aporeplace($newimage) . "' ";
                $usql .= "WHERE acontent_id=" . $row['acontent_id'] . " LIMIT 1";
                mysql_query($usql, $db);
                echo 'Image ' . sprintf('%05d: ', $linenumber) . html_specialchars($frow['f_name']) . "\n";
            }
        }
        mysql_free_result($fresult);
    }
    flush();
    $linenumber++;
}
if (empty($usql)) {
    echo 'None of the content parts &quot;image with text&quot; needs to be upgraded.';
}
echo '</pre></body></html>';
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:upgrade_articleimages.php

示例8: VALUES

            }
        } else {
            // INSERT
            $sql = 'INSERT INTO ' . DB_PREPEND . 'phpwcms_glossary (';
            $sql .= 'glossary_created, glossary_changed, glossary_title, glossary_tag, ';
            $sql .= 'glossary_keyword, glossary_text, glossary_highlight, glossary_object, glossary_status';
            $sql .= ') VALUES (';
            $sql .= "'" . aporeplace($plugin['data']['glossary_created']) . "', ";
            $sql .= "'" . aporeplace($plugin['data']['glossary_changed']) . "', ";
            $sql .= "'" . aporeplace($plugin['data']['glossary_title']) . "', ";
            $sql .= "'" . aporeplace($plugin['data']['glossary_tag']) . "', ";
            $sql .= "'" . aporeplace($plugin['data']['glossary_keyword']) . "', ";
            $sql .= "'" . aporeplace($plugin['data']['glossary_text']) . "', ";
            $sql .= aporeplace($plugin['data']['glossary_highlight']) . ', ';
            $sql .= "'" . aporeplace(serialize($plugin['data']['glossary_object'])) . "', ";
            $sql .= aporeplace($plugin['data']['glossary_status']);
            $sql .= ')';
            if (@_dbQuery($sql, 'INSERT')) {
                if (isset($_POST['save'])) {
                    headerRedirect(decode_entities(MODULE_HREF));
                }
            } else {
                $plugin['error']['update'] = mysql_error();
            }
        }
    }
}
// try to read entry from database
if ($plugin['id'] && !isset($plugin['error'])) {
    $sql = 'SELECT *,';
    $sql .= "DATE_FORMAT(adcampaign_datestart, '%d" . $BLM['date_delimiter'] . "%m" . $BLM['date_delimiter'] . "%Y') AS adcampaign_date_start, ";
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:processing.inc.php

示例9: implode

         $plugin['order_status'][] = 'PAYED';
     }
     if (!empty($_POST['status_send'])) {
         $plugin['order_status'][] = 'SENT';
     }
     if (!empty($_POST['status_back'])) {
         $plugin['order_status'][] = 'RETURN';
     }
     if (!empty($_POST['status_done'])) {
         $plugin['order_status'][] = 'COMPLETED';
     }
     $plugin['order_status'] = implode('-', $plugin['order_status']);
     if ($plugin['order_status'] == '') {
         $plugin['order_status'] = 'NEW-ORDER';
     }
     $sql = 'UPDATE ' . DB_PREPEND . "phpwcms_shop_orders SET order_status='" . aporeplace($plugin['order_status']) . "' ";
     $sql .= "WHERE order_id=" . intval($_POST['order_status']);
     if (_dbQuery($sql, 'UPDATE')) {
         set_status_message($BLM['shopprod_status_msg'], 'success');
     }
 }
 $sql = 'SELECT *, UNIX_TIMESTAMP(order_date) AS order_date_unix FROM ' . DB_PREPEND . 'phpwcms_shop_orders ';
 $sql .= "WHERE order_id = " . intval($_GET['show']);
 $plugin['data'] = _dbQuery($sql);
 if (isset($plugin['data'][0])) {
     $plugin['data'] = $plugin['data'][0];
     $plugin['data']['order_data'] = @unserialize($plugin['data']['order_data']);
 } else {
     headerRedirect(shop_url('controller=order', ''));
 }
 $BLM['shopprod_payby_INVOICE'] = $BLM['shopprod_payby_onbill'];
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:processing.orders.inc.php

示例10: array

    if (!$_entry['list_active']) {
        $_entry['query'] .= 'cat_status=0';
    }
    if (!$_entry['list_inactive']) {
        $_entry['query'] .= 'cat_status=1';
    }
} else {
    $_entry['query'] .= 'cat_status!=9';
}
$_entry['query'] .= " AND cat_type='module_shop'";
if (isset($_SESSION['filter_shop_category']) && is_array($_SESSION['filter_shop_category']) && count($_SESSION['filter_shop_category'])) {
    $_entry['filter_array'] = array();
    foreach ($_SESSION['filter_shop_category'] as $_entry['filter']) {
        //usr_name, usr_login, usr_email
        $_entry['filter_array'][] = "cat_name LIKE '%" . aporeplace($_entry['filter']) . "%'";
        $_entry['filter_array'][] = "cat_info LIKE '%" . aporeplace($_entry['filter']) . "%'";
    }
    if (count($_entry['filter_array'])) {
        $_SESSION['filter_shop_category'] = ' AND (' . implode(' OR ', $_entry['filter_array']) . ')';
        $_entry['query'] .= $_SESSION['filter_shop_category'];
    }
} elseif (isset($_SESSION['filter_shop_category']) && is_string($_SESSION['filter_shop_category'])) {
    $_entry['query'] .= $_SESSION['filter_shop_category'];
}
// paginating values
$_entry['count_total'] = _dbQuery('SELECT COUNT(cat_id) FROM ' . DB_PREPEND . 'phpwcms_categories WHERE ' . $_entry['query'], 'COUNT');
$_entry['pages_total'] = ceil($_entry['count_total'] / $_SESSION['list_count']);
if ($_SESSION['detail_page'] > $_entry['pages_total']) {
    $_SESSION['detail_page'] = empty($_entry['pages_total']) ? 1 : $_entry['pages_total'];
}
?>
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:listing.categories.inc.php

示例11: clean_slweg

     }
     $phpwcms['SMTP_MAILER'] = clean_slweg($_POST["smtp_mailer"]);
     if (!$phpwcms['SMTP_MAILER']) {
         $phpwcms['SMTP_MAILER'] = 'mail';
     }
     $phpwcms['SMTP_AUTH'] = empty($_POST["smtp_auth"]) ? 0 : 1;
     $phpwcms['SMTP_USER'] = slweg($_POST["smtp_user"]);
     $phpwcms['SMTP_PASS'] = slweg($_POST["smtp_pass"]);
     $phpwcms['SMTP_SECURE'] = clean_slweg($_POST["smtp_secure"]);
     write_conf_file($phpwcms);
     if (!empty($_POST["admin_create"])) {
         $db = mysql_connect($phpwcms["db_host"], $phpwcms["db_user"], $phpwcms["db_pass"]);
         mysql_select_db($phpwcms["db_table"], $db);
         mysql_query("SET NAMES '" . $phpwcms["charset"] . "'", $db);
         $phpwcms["db_prepend"] = $phpwcms["db_prepend"] ? $phpwcms["db_prepend"] . "_" : "";
         $sql = "INSERT INTO " . $phpwcms["db_prepend"] . "phpwcms_user (usr_login, usr_pass, usr_email, " . "usr_admin, usr_aktiv, usr_name, usr_fe, usr_wysiwyg ) VALUES ('" . aporeplace($phpwcms["admin_user"]) . "', '" . aporeplace(md5($phpwcms["admin_pass"])) . "', '" . aporeplace($phpwcms["admin_email"]) . "', 1, 1, '" . aporeplace($phpwcms['SMTP_FROM_NAME']) . "', 2, 2);";
         mysql_query($sql, $db) or $err = 1;
     }
     if (!$err) {
         header("Location: setup.php?step=3");
         exit;
     }
 }
 if ($step == 3 && $do) {
     $phpwcms['DOC_ROOT'] = clean_slweg($_POST["doc_root"]);
     $phpwcms["root"] = clean_slweg($_POST["root"]);
     $phpwcms["file_path"] = clean_slweg($_POST["file_path"]);
     $phpwcms["templates"] = clean_slweg($_POST["templates"]);
     $phpwcms["ftp_path"] = clean_slweg($_POST["ftp_path"]);
     $phpwcms["file_path"] = $phpwcms["file_path"] ? $phpwcms["file_path"] : "phpwcms_filestorage";
     $phpwcms["templates"] = $phpwcms["templates"] ? $phpwcms["templates"] : "phpwcms_template";
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:setup.check.inc.php

示例12: convertStringToArray

        $_SESSION['filter_seo'] = convertStringToArray($_SESSION['filter_seo'], ' ');
        $_POST['filter'] = $_SESSION['filter_seo'];
    }
    $_SESSION['seolog_page'] = intval($_POST['page']);
}
if (empty($_SESSION['seolog_page'])) {
    $_SESSION['seolog_page'] = 1;
}
$_entry['list_active'] = isset($_SESSION['list_active']) ? $_SESSION['list_active'] : 1;
$_entry['list_inactive'] = isset($_SESSION['list_inactive']) ? $_SESSION['list_inactive'] : 1;
$_entry['query'] = '';
if (isset($_SESSION['filter_seo']) && is_array($_SESSION['filter_seo']) && count($_SESSION['filter_seo'])) {
    $_entry['filter_array'] = array();
    foreach ($_SESSION['filter_seo'] as $_entry['filter']) {
        //usr_name, usr_login, usr_email
        $_entry['filter_array'][] = "CONCAT(domain,query) LIKE '%" . aporeplace($_entry['filter']) . "%'";
    }
    if (count($_entry['filter_array'])) {
        $_SESSION['filter_seo'] = ' AND (' . implode(' OR ', $_entry['filter_array']) . ')';
        $_entry['query'] .= $_SESSION['filter_seo'];
    }
} elseif (isset($_SESSION['filter_seo']) && is_string($_SESSION['filter_seo'])) {
    $_entry['query'] .= $_SESSION['filter_seo'];
}
$sql = 'SELECT * FROM ' . DB_PREPEND . 'phpwcms_log_seo ';
if ($_entry['query']) {
    $sql .= 'WHERE ' . $_entry['query'] . ' ';
}
$sql .= 'GROUP BY hash';
// paginating values
$_entry['count_total'] = _dbQuery($sql, 'COUNT');
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:backend.listing.php

示例13: aporeplace

        $sql .= "address_subscription\t= '" . aporeplace($_userInfo['subscriber_data']['address_subscription']) . "' ";
        $sql .= 'WHERE ';
        if ($_userInfo['count']) {
            // update based on email address
            $sql .= "address_email='" . aporeplace($_userInfo['subscriber_data']['address_email']) . "'";
        } else {
            // update based on email address
            $sql .= 'address_id=' . $_userInfo['subscriber_data']['address_id'];
            $sql .= ' LIMIT 1';
        }
        _dbQuery($sql, 'UPDATE');
    } else {
        // insert
        $sql = 'INSERT INTO ' . DB_PREPEND . 'phpwcms_address ';
        $sql .= '(address_key, address_email, address_name, address_verified, address_subscription) VALUES (';
        $sql .= "'" . aporeplace(shortHash($_userInfo['subscriber_data']['address_email'] . time())) . "', ";
        $sql .= "'" . aporeplace($_userInfo['subscriber_data']['address_email']) . "', ";
        $sql .= "'" . aporeplace($_userInfo['subscriber_data']['address_name']) . "', ";
        $sql .= $_userInfo['subscriber_data']['address_verified'] . ", ";
        $sql .= "'" . aporeplace($_userInfo['subscriber_data']['address_subscription']) . "')";
        $_userInfo['result'] = _dbQuery($sql, 'INSERT');
        if (!empty($_userInfo['result']['INSERT_ID'])) {
            $_userInfo['subscriber_id'] = $_userInfo['result']['INSERT_ID'];
            $_userInfo['subscriber_data']['address_id'] = $_userInfo['result']['INSERT_ID'];
        }
    }
}
// in case data should be saved and closed then
if ($_userInfo['error']['email'] == 0 && (!empty($_POST['save']) || !empty($_userInfo['count']))) {
    $_userInfo['subscriber_data'] = false;
}
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:subscriber.form.inc.php

示例14: mysql_query

    }
    $_SESSION["structure"][$open_id] = $open_value;
    mysql_query("UPDATE " . DB_PREPEND . "phpwcms_user SET usr_var_structure=" . _dbEscape(serialize($_SESSION["structure"])) . " WHERE usr_id=" . aporeplace($_SESSION["wcs_user_id"]), $db);
}
//31-03-2005 Fernando Batista  start---------------------------------------------------------------------------
$cut_article_content = isset($_GET["accut"]) ? intval($_GET["accut"]) : 0;
$copy_article_content = isset($_GET["accopy"]) ? intval($_GET["accopy"]) : 0;
if (isset($_GET["opena"])) {
    list($open_id, $open_value) = explode(":", $_GET["opena"]);
    $open_id = intval($open_id);
    if (empty($open_value)) {
        unset($_SESSION["structure"]["article"][$open_id]);
    } else {
        $_SESSION["structure"]["article"][$open_id] = $open_value;
    }
    mysql_query("UPDATE " . DB_PREPEND . "phpwcms_user SET usr_var_structure=" . _dbEscape(serialize($_SESSION["structure"])) . " WHERE usr_id=" . aporeplace($_SESSION["wcs_user_id"]), $db);
}
//31-03-2005 Fernando Batista  end-------------------
$child_count = get_root_childcount(0, $db);
//$an = $BL['be_admin_struct_index'];
$an = $indexpage['acat_name'];
$a = "<tr onMouseOver=\"this.bgColor='#CCFF00';\" onMouseOut=\"this.bgColor='#FFFFFF';\">\n";
$a .= '<td width="461">';
$a .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\">\n<tr>\n";
$a .= '<td nowrap="nowrap">';
$a .= $child_count ? "<a href=\"phpwcms.php?do=articles&amp;open=0:" . ($_SESSION["structure"][0] ? 0 : 1) . "\">" : "";
$a .= "<img src=\"img/symbole/plus_" . ($child_count ? $_SESSION["structure"][0] ? "close" : "open" : "empty");
$a .= ".gif\" width=\"15\" height=\"15\" border=\"0\" alt=\"\">" . ($child_count ? "</a>" : "");
$a .= "<img src=\"img/symbole/page_1.gif\" width=\"11\" height=\"15\" ";
$info = 'ID: <b>0</b><br />';
$info .= 'ALIAS: ' . html($indexpage["acat_alias"]);
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:article.structlist.tmpl.php

示例15: trim

}
if ($_userInfo['list_norm']) {
    $_userInfo['list'][] = ' usr_fe=1 ';
}
if ($_userInfo['list_fe']) {
    $_userInfo['list'][] = ' usr_fe=0 ';
}
$_userInfo['list'] = trim(implode('OR', $_userInfo['list']));
if ($_userInfo['list']) {
    $_userInfo['where_query'] .= ' AND (' . $_userInfo['list'] . ')';
}
if (isset($_SESSION['filter_results']) && count($_SESSION['filter_results'])) {
    $_userInfo['filter_array'] = array();
    foreach ($_SESSION['filter_results'] as $_userInfo['filter']) {
        //usr_name, usr_login, usr_email
        $_userInfo['filter_array'][] = "CONCAT(usr_name, usr_login, usr_email) LIKE '%" . aporeplace($_userInfo['filter']) . "%'";
    }
    if (count($_userInfo['filter_array'])) {
        $_userInfo['where_query'] .= ' AND (' . implode('OR', $_userInfo['filter_array']) . ')';
    }
}
// paginating values
$_userInfo['count_total'] = _dbQuery("SELECT COUNT(*) FROM " . DB_PREPEND . "phpwcms_user " . $_userInfo['where_query'], 'COUNT');
$_userInfo['pages_total'] = ceil($_userInfo['count_total'] / $_SESSION['list_user_count']);
if ($_SESSION['list_user_page'] > $_userInfo['pages_total']) {
    $_SESSION['list_user_page'] = empty($_userInfo['pages_total']) ? 1 : $_userInfo['pages_total'];
}
?>
<table width="538" border="0" cellpadding="0" cellspacing="0" summary="">
        <tr><td colspan="3" class="title"><?php 
echo $BL['be_admin_usr_ltitle'];
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:admin.listuser.tmpl.php


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