本文整理汇总了PHP中getUserConfig函数的典型用法代码示例。如果您正苦于以下问题:PHP getUserConfig函数的具体用法?PHP getUserConfig怎么用?PHP getUserConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getUserConfig函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: updateStatus
public function updateStatus($plugin, $status)
{
$siteConfig = getUserConfig()->getSiteSettings();
$plugins = (array) explode(',', $siteConfig['plugins']['activePlugins']);
switch ($status) {
case 'activate':
if (!in_array($plugin, $plugins)) {
$plugins[] = $plugin;
}
break;
case 'deactivate':
if (in_array($plugin, $plugins)) {
foreach ($plugins as $key => $thisPlugin) {
if ($plugin == $thisPlugin) {
unset($plugins[$key]);
}
}
}
break;
}
$siteConfig['plugins']['activePlugins'] = implode(',', $plugins);
$siteConfigStatus = getUserConfig()->writeSiteSettings($siteConfig);
if (!$siteConfigStatus) {
return $this->error('Could not change status of plugin', false);
} else {
return $this->success('Plugin status changed', true);
}
}
开发者ID:nicolargo,项目名称:frontend,代码行数:28,代码来源:ApiPluginController.php
示例2: change
/**
* 修改皮肤弹窗
*/
public function change()
{
$skinList = getSkinList();
$this->assign('skinList', $skinList);
$defaultSkin = getUserConfig();
$this->assign('defaultSkin', $defaultSkin);
$this->display(T('Addons://Skin@Skin/change'));
}
开发者ID:admpub,项目名称:OpenCenter,代码行数:11,代码来源:SkinController.class.php
示例3: pageHeader
/**
* 站点头部钩子,加载换肤插件所需样式
* @param array $param 相关参数
* @return bool
* @author 郑钟良<[email protected]>
*/
public function pageHeader($param)
{
$SkinsUrl = getRootUrl() . "Addons/Skin/Skins/";
$config = getAddonConfig();
if ($config['canSet'] == 0 || $config['mandatory'] == 1) {
//强制执行管理员设置的默认皮肤
// 载入换肤插件默认样式
echo '<link href="' . $SkinsUrl . $config['defaultSkin'] . '/style.css" data-role="skin_link" rel="stylesheet" type="text/css"/>';
} else {
//执行用户设置样式
// 载入换肤插件用户样式
$userSkin = getUserConfig();
echo '<link href="' . $SkinsUrl . $userSkin['skin'] . '/style.css" data-role="skin_link" rel="stylesheet" type="text/css"/>';
}
}
开发者ID:admpub,项目名称:OpenCenter,代码行数:21,代码来源:SkinAddon.class.php
示例4: writeDbLogSql
function writeDbLogSql($sql, $type = 's')
{
if (getUserConfig("dblog") != "") {
if ($type == 's') {
if (substr($sql, 0, 24) == "insert into pdfarchiving") {
return;
}
}
$f = fopen(getUserConfig("dblog"), "a");
if ($f) {
fwrite($f, $type . ":" . serialize($sql) . "\r\n");
fclose($f);
} else {
session_addvalue("error", "unable to write db log");
}
}
}
开发者ID:jawedkhan,项目名称:rorca,代码行数:17,代码来源:db.php
示例5: resendConfirm
function resendConfirm($id)
{
global $tables, $envelope, $prepend;
$userdata = Sql_Fetch_Array_Query("select * from {$tables["user"]} where id = {$id}");
$lists_req = Sql_Query(sprintf('select %s.name from %s,%s where
%s.listid = %s.id and %s.userid = %d', $tables["list"], $tables["list"], $tables["listuser"], $tables["listuser"], $tables["list"], $tables["listuser"], $id));
while ($row = Sql_Fetch_Row($lists_req)) {
$lists .= ' * ' . $row[0] . "\n";
}
if ($userdata["subscribepage"]) {
$subscribemessage = ereg_replace('\\[LISTS\\]', $lists, getUserConfig("subscribemessage:" . $userdata["subscribepage"], $id));
$subject = getConfig("subscribesubject:" . $userdata["subscribepage"]);
} else {
$subscribemessage = ereg_replace('\\[LISTS\\]', $lists, getUserConfig("subscribemessage", $id));
$subject = getConfig("subscribesubject");
}
logEvent("Resending confirmation request to " . $userdata["email"]);
if (!TEST) {
return sendMail($userdata["email"], $subject, $prepend . $subscribemessage, system_messageheaders($userdata["email"]), $envelope);
}
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:21,代码来源:reconcileusers.php
示例6: resendConfirm
function resendConfirm($id)
{
global $tables, $envelope;
$userdata = Sql_Fetch_Array_Query("select * from {$tables['user']} where id = {$id}");
$lists_req = Sql_Query(sprintf('select %s.name from %s,%s where
%s.listid = %s.id and %s.userid = %d', $tables['list'], $tables['list'], $tables['listuser'], $tables['listuser'], $tables['list'], $tables['listuser'], $id));
while ($row = Sql_Fetch_Row($lists_req)) {
$lists .= ' * ' . $row[0] . "\n";
}
if ($userdata['subscribepage']) {
$subscribemessage = str_replace('[LISTS]', $lists, getUserConfig('subscribemessage:' . $userdata['subscribepage'], $id));
$subject = getConfig('subscribesubject:' . $userdata['subscribepage']);
} else {
$subscribemessage = str_replace('[LISTS]', $lists, getUserConfig('subscribemessage', $id));
$subject = getConfig('subscribesubject');
}
logEvent($GLOBALS['I18N']->get('Resending confirmation request to') . ' ' . $userdata['email']);
if (!TEST) {
return sendMail($userdata['email'], $subject, $_REQUEST['prepend'] . $subscribemessage, system_messageheaders($userdata['email']), $envelope);
}
}
开发者ID:gillima,项目名称:phplist3,代码行数:21,代码来源:reconcileusers.php
示例7: reset
if (is_array($_SESSION["lists"])) {
reset($_SESSION["lists"]);
$addition = 0;
$listoflists = "";
while (list($key, $listid) = each($_SESSION["lists"])) {
$query = "replace INTO " . $tables["listuser"] . " (userid,listid,entered) values({$userid},{$listid},now())";
$result = Sql_query($query, 1);
# if the affected rows is 2, the user was already subscribed
$addition = $addition || Sql_Affected_Rows() == 1;
$listoflists .= " * " . $_SESSION["listname"][$key] . "\n";
}
if ($addition) {
$count["list_add"]++;
}
if (!TEST && $_SESSION["notify"] == "yes" && $addition) {
$subscribemessage = ereg_replace('\\[LISTS\\]', $listoflists, getUserConfig("subscribemessage", $userid));
sendMail($user["systemvalues"]["email"], getConfig("subscribesubject"), $subscribemessage, system_messageheaders(), $envelope);
}
}
if (!is_array($_SESSION["groups"])) {
$groups = array();
} else {
$groups = $_SESSION["groups"];
}
if (isset($everyone_groupid) && !in_array($everyone_groupid, $groups)) {
array_push($groups, $everyone_groupid);
}
if (is_array($groups)) {
#add this user to the groups identified
reset($groups);
$groupaddition = 0;
开发者ID:alancohen,项目名称:alancohenexperience-com,代码行数:31,代码来源:importcsv.php
示例8: makecontact_execute
function makecontact_execute($action, $slot)
{
global $_POST;
global $_GET;
global $_CONFIG;
require_once "config/db.php";
global $conn;
global $_local_error;
$_local_error = "";
global $_local_reloadform;
$_local_reloadform = "";
global $render_current_slot;
global $current_slots;
//mark slot on execution stack
$render_current_slot++;
$current_slots[$render_current_slot] = $slot;
if (getUserConfig("pageprotection") == "yes") {
if (isset($_POST['fprotection']) && $_POST['fprotection'] != "") {
if (isset($_GET['ajax']) && $_GET['ajax'] == 1) {
if (intval(session_getvalue("protection_page")) != intval($_POST['fprotection'])) {
$_local_error = getLT("protectionerror");
}
} else {
if (intval(session_getvalue("protection_page")) != intval($_POST['fprotection']) + 1) {
$_local_error = getLT("protectionerror");
}
}
}
}
//set default filter
$control_filter = "";
$control_name = "makecontact";
$control_table = "projectissues";
$control_id = "id";
//check for rights
if (getUserConfig('dinsec_makecontact_cando', $action) == 'no') {
$_local_error = getLT('nopermissions');
}
if (getUserConfig('dinsec_makecontact_canpost', $action) == 'no') {
$_local_error = getLT('nopermissions');
}
if (session_getvalue("blockaccess_makecontact") == "yes") {
$_local_error = getLT('nopermissions');
}
if (session_getvalue("blockaccess_projectissues") == "yes") {
$_local_error = getLT('nopermissions');
}
if ($_local_error == "") {
switch ($action) {
case 'add':
if (isset($_POST['cancel_button']) && $_POST['cancel_button'] == getLT('cancel')) {
$_local_error = 'usercanceled';
setSlotView($slot, "add");
break;
}
if ($_local_error == '') {
if (!isset($_POST['iname']) || $_POST['iname'] == '' || strip_tags($_POST['iname']) == '') {
$_local_error .= getLT('iname') . ' ' . getLT('shouldbefilled');
}
}
if ($_local_error == '') {
if (!isset($_POST['iemail']) || $_POST['iemail'] == '' || strip_tags($_POST['iemail']) == '') {
$_local_error .= getLT('iemail') . ' ' . getLT('shouldbefilled');
}
}
if ($_local_error == '') {
if (!isset($_POST['icontactname']) || $_POST['icontactname'] == '' || strip_tags($_POST['icontactname']) == '') {
$_local_error .= getLT('icontactname') . ' ' . getLT('shouldbefilled');
}
}
if ($_local_error == '') {
if (!isset($_POST['useraddress'])) {
$_local_error .= getLT('javascript?');
} else {
$ab_def = strtok($_POST['useraddress'], "-");
$ab_test = $ab_def . '-' . number_format(floatVal($ab_def . '.12') * 0.34, 4, '.', '');
if ($ab_test !== $_POST['useraddress']) {
$_local_error .= getLT('antiboterror?');
}
}
}
if ($_local_error == "") {
$conn->addnew($control_table);
$conn->setvalue('iname', correctPostValue($_POST['iname']));
$conn->setvalue('iemail', correctPostValue($_POST['iemail']));
$conn->setvalue('icontactname', correctPostValue($_POST['icontactname']));
$html = correctPostValue($_POST['idesc']);
$html = str_ireplace("<script", "[script", $html);
$html = str_ireplace("<link", "[link", $html);
$html = str_ireplace("<style", "[style", $html);
$conn->setvalue('idesc', $html);
$conn->setvalue('projectid', $_CONFIG['projectid']);
$conn->setvalue('idate', date("Y-m-d H:i:s"));
$id = $conn->update();
if ($id != "") {
session_addvalue($slot . '_info', getLT('wblank'));
session_setvalue($slot . "_viewid", $id);
setSlotView($slot, "add");
} else {
$_local_error = getLT('unableadd');
//.........这里部分代码省略.........
开发者ID:jawedkhan,项目名称:rorca,代码行数:101,代码来源:control_makecontact.php
示例9: resetUniqueValue
function resetUniqueValue($md5, $value, $user, $userid = 0)
{
$connf = create_db_connection();
$connf->execute("update " . getUserConfig("dbprefix") . "uniquevalues set util='" . $connf->escape($value) . "' where md5='" . $connf->escape($md5) . "' and user='" . $connf->escape($user) . "' and userid=0" . intval($userid));
return $value;
}
开发者ID:jawedkhan,项目名称:rorca,代码行数:6,代码来源:upload.php
示例10: reset
#add this user to the lists identified
reset($lists);
$addition = 0;
$listoflists = "";
while (list($key, $listid) = each($lists)) {
$query = "replace INTO " . $tables["listuser"] . " (userid,listid,entered) values({$userid},{$listid},current_timestamp)";
$result = Sql_query($query);
# if the affected rows is 2, the user was already subscribed
$addition = $addition || Sql_Affected_Rows() == 1;
$listoflists .= " * " . $available_lists[$listid] . "\n";
}
if ($addition) {
$additional_emails++;
}
if (!TEST && $_POST["notify"] == "yes" && $addition) {
$subscribemessage = str_replace('[LISTS]', $listoflists, getUserConfig("subscribemessage", $userid));
sendMail($email, getConfig("subscribesubject"), $subscribemessage, system_messageheaders(), $envelope);
}
}
// end if
}
// end foreach
$num_lists = sizeof($lists);
# be grammatically correct :-)
$displists = $num_lists == 1 ? $GLOBALS['I18N']->get('list') : $GLOBALS['I18N']->get('lists');
$dispemail = $count_email_add == 1 ? $GLOBALS['I18N']->get('new email was') . " " : $GLOBALS['I18N']->get('new emails were') . " ";
$dispemail2 = $additional_emails == 1 ? $GLOBALS['I18N']->get('email was') . " " : $GLOBALS['I18N']->get('emails were') . " ";
if (!$some && !$additional_emails) {
print "<br/>" . $GLOBALS['I18N']->get("All the emails already exist in the database and are members of the") . " {$displists}.";
} else {
print "{$count_email_add} {$dispemail} " . $GLOBALS['I18N']->get("succesfully imported to the database and added to") . " {$num_lists} {$displists}.<br/>{$additional_emails} {$dispemail2} " . $GLOBALS['I18N']->get("subscribed to the") . " {$displists}";
开发者ID:dehvCurtis,项目名称:phplist,代码行数:31,代码来源:import3.php
示例11: unsubscribePage
function unsubscribePage($id)
{
global $tables;
$email = '';
$userid = 0;
$msg = '';
## for unsubscribe, don't validate host
$GLOBALS['check_for_host'] = 0;
$res = '<title>' . $GLOBALS['strUnsubscribeTitle'] . '</title>' . "\n";
$res .= $GLOBALS['pagedata']['header'];
if (isset($_GET['uid'])) {
$userdata = Sql_Fetch_Array_Query(sprintf('select email,id,blacklisted from %s where uniqid = "%s"', $tables['user'], sql_escape($_GET['uid'])));
$email = $userdata['email'];
$userid = $userdata['id'];
$isBlackListed = $userdata['blacklisted'] != '0';
$blacklistRequest = false;
} else {
if (isset($_REQUEST['email'])) {
$email = $_REQUEST['email'];
}
if (!validateEmail($email)) {
$email = '';
}
#0013076: Blacklisting posibility for unknown users
# Set flag for blacklisting
$blacklistRequest = $_GET['p'] == 'blacklist' || $_GET['p'] == 'donotsend';
# only proceed when user has confirm the form
if ($blacklistRequest && is_email($email)) {
$_POST['unsubscribe'] = 1;
$_POST['unsubscribereason'] = s('Forwarded receiver requested blacklist');
}
}
if (UNSUBSCRIBE_JUMPOFF || !empty($_GET['jo'])) {
$_POST['unsubscribe'] = 1;
$_REQUEST['email'] = $email;
if (!empty($_GET['jo'])) {
$blacklistRequest = true;
$_POST['unsubscribereason'] = s('"Jump off" used by subscriber, reason not requested');
} else {
$_POST['unsubscribereason'] = s('"Jump off" set, reason not requested');
}
}
foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
# print $pluginname.'<br/>';
if ($plugin->unsubscribePage($email)) {
return;
}
}
if (!empty($email) && isset($_POST['unsubscribe']) && isset($_REQUEST['email']) && isset($_POST['unsubscribereason'])) {
## all conditions met, do the unsubscribe
#0013076: Blacklisting posibility for unknown users
// It would be better to do this above, where the email is set for the other cases.
// But to prevent vulnerabilities let's keep it here for now. [bas]
if (!$blacklistRequest) {
$query = Sql_Fetch_Row_Query(sprintf('select id,email,blacklisted from %s where email = "%s"', $tables['user'], sql_escape($email)));
$userid = $query[0];
$email = $query[1];
$isBlackListed = !empty($query[2]);
}
if (!$userid) {
#0013076: Blacklisting posibility for unknown users
if ($blacklistRequest && !empty($email)) {
addUserToBlacklist($email, $_POST['unsubscribereason']);
addSubscriberStatistics('blacklist', 1);
$res .= '<h3>' . $GLOBALS['strUnsubscribedNoConfirm'] . '</h3>';
} else {
$res .= $GLOBALS['strNoListsFound'];
#'Error: '.$GLOBALS["strUserNotFound"];
logEvent('Request to unsubscribe non-existent user: ' . substr($email, 0, 150));
}
} else {
$subscriptions = array();
$listsreq = Sql_Query(sprintf('select listid from %s where userid = %d', $GLOBALS['tables']['listuser'], $userid));
while ($row = Sql_Fetch_Row($listsreq)) {
array_push($subscriptions, $row[0]);
}
## 17753 - do not actually remove the list-membership when unsubscribing
# $result = Sql_query(sprintf('delete from %s where userid = %d',$tables["listuser"],$userid));
$lists = ' * ' . $GLOBALS['strAllMailinglists'] . "\n";
if (empty($isBlackListed)) {
// only process when not already marked as blacklisted
# add user to blacklist
addUserToBlacklist($email, nl2br(strip_tags($_POST['unsubscribereason'])));
addUserHistory($email, 'Unsubscription', "Unsubscribed from {$lists}");
$unsubscribemessage = str_replace('[LISTS]', $lists, getUserConfig("unsubscribemessage:{$id}", $userid));
sendMail($email, getUserConfig("unsubscribesubject:{$id}"), stripslashes($unsubscribemessage), system_messageheaders($email), '', true);
$reason = $_POST['unsubscribereason'] ? "Reason given:\n" . stripslashes($_POST['unsubscribereason']) : 'No Reason given';
sendAdminCopy('List unsubscription', $email . " has unsubscribed\n{$reason}", $subscriptions);
addSubscriberStatistics('unsubscription', 1);
}
}
if ($userid) {
$res .= '<h3>' . $GLOBALS['strUnsubscribeDone'] . '</h3>';
}
#0013076: Blacklisting posibility for unknown users
//if ($blacklistRequest) {
//$res .= '<h3>'.$GLOBALS["strYouAreBlacklisted"] ."</h3>";
//}
$res .= $GLOBALS['PoweredBy'] . '</p>';
$res .= $GLOBALS['pagedata']['footer'];
//.........这里部分代码省略.........
开发者ID:gillima,项目名称:phplist3,代码行数:101,代码来源:index.php
示例12: getCodeFromNomenclator
function getCodeFromNomenclator($soc, $grupa, $valoare, $type = 0, $paras = array())
{
$resp = "0";
$url = getUserConfig("nomenclator_url");
if ($url == '') {
global $localcodecall;
$localcodecall = array();
$localcodecall['soc'] = $soc;
$localcodecall['grupa'] = $grupa;
$localcodecall['valoare'] = $valoare;
foreach ($paras as $kk => $vv) {
$localcodecall[$kk] = $vv;
}
ob_start();
include "coduri/code.php";
$resp = ob_get_contents();
ob_end_clean();
} else {
$newurl = $url . "?soc=" . urlencode($soc) . "&grupa=" . urlencode($grupa) . "&valoare=" . urlencode($valoare);
foreach ($paras as $kk => $vv) {
$newurl .= '&' . $kk . '=' . $vv;
}
$resp = file_get_contents($newurl);
}
if ($type !== false) {
$r = explode("*", $resp);
if (isset($r[$type])) {
return $r[$type];
}
}
return $resp;
}
开发者ID:jawedkhan,项目名称:rorca,代码行数:32,代码来源:utils.php
示例13: getUserConfig
<div class="workstep"><div class="worklabel" style="width:230px;">Afectiuni ginecologice: infectie HPV, cervicita cronica, fibromatoza uterina, endometrioza, mastopatie fibrochistica, nodul mamar, boala inflamatorie pelvina, anexita cronica?</div><div class="workfields" style="width:50px;"><select name="bo_Question17" style="width:50px;"><option value="">Nu</option><option value="1">Da</option></select>
</div></div>
<?php
if (getUserConfig("emaildinprima") == "yes") {
?>
<div class="workstep"><div class="worklabel">Email:</div><div class=workfields><input name="emailclient" value="" class="validated" validate="required.email" size="20" type="email">
</div></div>
<?php
}
?>
<?php
if (getUserConfig("codpromotional") != "") {
?>
<div class="workstep"><div class="worklabel"><?php
echo getUserConfig("codpromotional");
?>
:</div><div class=workfields><input name="codpromotional" value="" size="20" type="text">
</div></div>
<?php
}
?>
</div>
<!-- worksteps--></div>
开发者ID:jawedkhan,项目名称:rorca,代码行数:28,代码来源:info_tarifar_sanatate.php
示例14: updateCells
});
function updateCells()
{
var SA=parseFloat($("input[name=sumaasigurata]").val());
var AC=parseFloat($("input[name=anconstructie]").val());
$("*[crule]").each(function(){
var afrule=0;
eval($(this).attr("crule"));
afrule=afrule.toFixed(0);
$(this).html(""+afrule+" EURO");
});
}
</script>
<?php
if (getUserConfig('projectid') != "") {
function getColorFromParameter($p, $d)
{
$valret = session_getvalue("colors_" . $p);
if ($valret == "") {
$valret = $d;
}
if (isset($_GET[$p]) && $_GET[$p] != "") {
$valret = '#' . substr($_GET[$p], 0, 6);
}
session_setvalue("colors_" . $p, $valret);
return $valret;
}
?>
<style>
#ofertatarife * {text-shadow:none;}
开发者ID:jawedkhan,项目名称:rorca,代码行数:31,代码来源:info_commonoferta.php
示例15: getSiteConfigs
getSiteConfigs();
global $conn;
global $_CONFIG;
require_once 'extern/Mobilpay/Payment/Request/Abstract.php';
require_once 'extern/Mobilpay/Payment/Request/Card.php';
require_once 'extern/Mobilpay/Payment/Request/Notify.php';
require_once 'extern/Mobilpay/Payment/Invoice.php';
require_once 'extern/Mobilpay/Payment/Address.php';
$errorCode = 0;
$errorType = Mobilpay_Payment_Request_Abstract::CONFIRM_ERROR_TYPE_NONE;
$errorMessage = '';
if (strcasecmp($_SERVER['REQUEST_METHOD'], 'post') == 0) {
if (isset($_POST['env_key']) && isset($_POST['data'])) {
#calea catre cheia privata
#cheia privata este generata de mobilpay, accesibil in Admin -> Conturi de comerciant -> Detalii -> Setari securitate
$privateKeyFilePath = getUserConfig('mobilpay_key');
try {
global $objPmReq;
$objPmReq = Mobilpay_Payment_Request_Abstract::factoryFromEncrypted($_POST['env_key'], $_POST['data'], $privateKeyFilePath);
#uncomment the line below in order to see the content of the request
print_r($objPmReq);
$errorCode = $objPmReq->objPmNotify->errorCode;
// action = status only if the associated error code is zero
if ($errorCode == "0") {
switch ($objPmReq->objPmNotify->action) {
#orice action este insotit de un cod de eroare si de un mesaj de eroare. Acestea pot fi citite folosind $cod_eroare = $objPmReq->objPmNotify->errorCode; respectiv $mesaj_eroare = $objPmReq->objPmNotify->errorMessage;
#pentru a identifica ID-ul comenzii pentru care primim rezultatul platii folosim $id_comanda = $objPmReq->orderId;
case 'confirmed':
#cand action este confirmed avem certitudinea ca banii au plecat din contul posesorului de card si facem update al starii comenzii si livrarea produsului
//update DB, SET status = "confirmed/captured"
$_GET['mobilpayipn'] = true;
开发者ID:jawedkhan,项目名称:rorca,代码行数:31,代码来源:mobilpayipn.php
示例16: unsubscribePage
function unsubscribePage($id)
{
$pagedata = pageData($id);
if (isset($pagedata['language_file']) && is_file(dirname(__FILE__) . '/texts/' . $pagedata['language_file'])) {
@(include dirname(__FILE__) . '/texts/' . $pagedata['language_file']);
}
global $tables;
$res .= '<title>' . $GLOBALS["strUnsubscribeTitle"] . '</title>';
$res = $pagedata["header"];
if (isset($_GET["uid"])) {
$req = Sql_Query("select * from {$tables['user']} where uniqid = \"" . $_GET["uid"] . "\"");
$userdata = Sql_Fetch_Array($req);
$email = $userdata["email"];
if (UNSUBSCRIBE_JUMPOFF) {
$_POST["unsubscribe"] = 1;
$_POST["email"] = $email;
$_POST["unsubscribereason"] = '"Jump off" set, reason not requested';
}
}
if (isset($_POST["unsubscribe"]) && (isset($_POST["email"]) || isset($_POST["unsubscribeemail"])) && isset($_POST["unsubscribereason"])) {
if (isset($_POST["email"])) {
$email = trim($_POST["email"]);
} else {
$email = $_POST["unsubscribeemail"];
}
$query = Sql_Fetch_Row_Query("select id,email from {$tables["user"]} where email = \"{$email}\"");
$userid = $query[0];
$email = $query[1];
if (!$userid) {
$res .= 'Error: ' . $GLOBALS["strUserNotFound"];
logEvent("Request to unsubscribe non-existent user: " . substr($_POST["email"], 0, 150));
} else {
$result = Sql_query("delete from {$tables["listuser"]} where userid = \"{$userid}\"");
$lists = " * " . $GLOBALS["strAllMailinglists"] . "\n";
# add user to blacklist
addUserToBlacklist($email, nl2br(strip_tags($_POST['unsubscribereason'])));
addUserHistory($email, "Unsubscription", "Unsubscribed from {$lists}");
$unsubscribemessage = ereg_replace("\\[LISTS\\]", $lists, getUserConfig("unsubscribemessage", $userid));
sendMail($email, getConfig("unsubscribesubject"), stripslashes($unsubscribemessage), system_messageheaders($email));
$reason = $_POST["unsubscribereason"] ? "Reason given:\n" . stripslashes($_POST["unsubscribereason"]) : "No Reason given";
sendAdminCopy("List unsubscription", $email . " has unsubscribed\n{$reason}");
addSubscriberStatistics('unsubscription', 1);
}
if ($userid) {
$res .= '<h1>' . $GLOBALS["strUnsubscribeDone"] . "</h1><P>";
}
$res .= $GLOBALS["PoweredBy"] . '</p>';
$res .= $pagedata["footer"];
return $res;
} elseif (isset($_POST["unsubscribe"]) && !$_POST["unsubscribeemail"]) {
$msg = '<span class="error">' . $GLOBALS["strEnterEmail"] . "</span><br>";
} elseif (!empty($_GET["email"])) {
$email = trim($_GET["email"]);
} else {
if (isset($_REQUEST["email"])) {
$email = $_REQUEST["email"];
} elseif (isset($_REQUEST['unsubscribeemail'])) {
$email = $_REQUEST['unsubscribeemail'];
} elseif (!isset($email)) {
$email = '';
}
}
if (!isset($msg)) {
$msg = '';
}
$res .= '<b>' . $GLOBALS["strUnsubscribeInfo"] . '</b><br>' . $msg . formStart();
$res .= '<table>
<tr><td>' . $GLOBALS["strEnterEmail"] . ':</td><td colspan=3><input type=text name="unsubscribeemail" value="' . $email . '" size=40></td></tr>
</table>';
if (!$email) {
$res .= "<input type=submit name=unsubscribe value=\"{$GLOBALS['strContinue']}\"></form>\n";
$res .= $GLOBALS["PoweredBy"];
$res .= $pagedata["footer"];
return $res;
}
$current = Sql_Fetch_Array_query("SELECT list.id as listid,user.uniqid as userhash, user.password as password FROM {$tables['list']} as list,{$tables['listuser']} as listuser,{$tables['user']} as user where list.id = listuser.listid and user.id = listuser.userid and user.email = \"{$email}\"");
$some = $current["listid"];
if (ASKFORPASSWORD && !empty($user['password'])) {
# it is safe to link to the preferences page, because it will still ask for
# a password
$hash = $current["userhash"];
} elseif (isset($_GET['uid']) && $_GET['uid'] == $current['userhash']) {
# they got to this page from a link in an email
$hash = $current['userhash'];
} else {
$hash = '';
}
$finaltext = $GLOBALS["strUnsubscribeFinalInfo"];
$pref_url = getConfig("preferencesurl");
$sep = ereg('\\?', $pref_url) ? '&' : '?';
$finaltext = eregi_replace('\\[preferencesurl\\]', $pref_url . $sep . 'uid=' . $hash, $finaltext);
if (!$some) {
$res .= "<b>" . $GLOBALS["strNoListsFound"] . "</b></ul>";
$res .= '<p><input type=submit value="' . $GLOBALS["strResubmit"] . '">';
} else {
list($r, $c) = explode(",", getConfig("textarea_dimensions"));
if (!$r) {
$r = 5;
}
if (!$c) {
//.........这里部分代码省略.........
开发者ID:alancohen,项目名称:alancohenexperience-com,代码行数:101,代码来源:index.php
示例17:
<div class="input-prepend">
<span class="add-on indicatie" style="width:200px;">Serie CI/Buletin</span>
<input type="text" name="pf_ciserie" value="" size="2" class="text-small" style="width:30px;">-<input type="number" name="pf_cinumar" value="" size="7" style="width:110px;" class="text-small">
</div>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="span10">
<div class="input-prepend">
<span class="add-on" style="width:200px;">Carte identitate vehicul</span>
<input type="text" class="span2 validated" name="serieciv" size=10 <?php
if (getUserConfig("platalibra") == "yes") {
echo 'validate="required.yes"';
}
?>
title="Talon nou: X, Talon vechi: 4">
</div>
</div>
</div>
<div class="row">
<div class="span10">
<div class="input-prepend">
<span class="add-on" style="width:200px;">Adresa de Corespondenta</span>
<select name="adresalivrare" class="span2 validated validateundo" validate="for.alta.show.id.adresalivrare">
<option value="prop">Aceeasi adresa</option>
开发者ID:jawedkhan,项目名称:rorca,代码行数:31,代码来源:info_tarifar_rca2_tarife.php
示例18: ob_start
<?php
ob_start();
if (getUserConfig("use_locale_jquery") == "yes") {
?>
<script type="text/javascript" src="js/jquery.js?1"></script><?php
} else {
?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<?php
}
?>
<script type="text/javascript">
function textareaImplode(name)
{
var alltxt='';
var allfi=true;
$('.'+name+'_implode').each(function()
{
if($(this).val()!='')
{
if(!allfi) alltxt+=', ';
allfi=false;
alltxt+=$(this).attr('label')+'. '+$(this).val();
}
});
alltxt=alltxt.toUpperCase();
$('textarea[name='+name+']').html(alltxt);
$('textarea[name='+name+']').val(alltxt);
}
</script>
开发者ID:jawedkhan,项目名称:rorca,代码行数:31,代码来源:jquery.php
示例19: intval
}
}
}
}
if (session_getvalue("current_language") == 'ro') {
$acceptro = true;
$accepten = false;
}
if (session_getvalue("current_language") == 'en') {
$acceptro = false;
$accepten = true;
}
$_CONFIG['projectthumb'] = "thumb";
//get parameters
if (isset($_GET['s']) && $_GET['s'] == 'info' && isset($_GET['id']) && $_GET['id'] != '') {
$siteface_id = intval($_GET['id']);
session_setvalue("siteface_" . getUserConfig('projectid') . "_id", intval($_GET['id']));
session_setvalue("siteface_" . getUserConfig('projectid') . "_sid", 0);
} else {
$siteface_id = session_getvalue("siteface_" . getUserConfig('projectid') . "_id");
}
if (isset($_GET['s']) && $_GET['s'] == 'info' && isset($_GET['sid']) && $_GET['sid'] != '') {
$siteface_sid = intval($_GET['sid']);
session_setvalue("siteface_" . getUserConfig('projectid') . "_sid", intval($_GET['sid']));
} else {
$siteface_sid = session_getvalue("siteface_" . getUserConfig('projectid') . "_sid");
}
//rights
$_CONFIG['dinsec_' . getLT("contracts") . '_cando_user'] = 'no';
$_CONFIG['dinsec_' . getLT("clients") . '_cando_user'] = 'no';
$_CONFIG['dinsec_' . getLT("propertiesorders") . '_cando_user'] = 'no';
开发者ID:jawedkhan,项目名称:rorca,代码行数:31,代码来源:config-all-after.php
示例20: str_replace
if (!is_numeric($key)) {
if ($old_data[$key] != $val && $key != 'password' && $key != 'modified') {
$information_changed = 1;
$history_entry .= "{$key} = {$val}\n*changed* from {$old_data[$key]}\n";
}
}
}
if (!$information_changed) {
$history_entry .= "\nNo user system details changed";
}
$history_entry .= "\n\nList Membership: \n{$lists}\n";
$message = str_replace('[LISTS]', $lists, getUserConfig('updatemessage', $userid));
$message = str_replace('[USERDATA]', $datachange, $message);
if ($emailchanged) {
$newaddressmessage = str_replace('[CONFIRMATIONINFO]', getUserConfig('emailchanged_text', $userid), $message);
$oldaddressmessage = str_replace('[CONFIRMATIONINFO]', getUserConfig('emailchanged_text_oldaddress', $userid), $message);
} else {
$message = str_replace('[CONFIRMATIONINFO]', '', $message);
}
print '<title>' . $GLOBALS['strPreferencesTitle'] . '</title>';
print $subscribepagedata['header'];
if (!TEST) {
if ($emailchanged) {
if (sendMail($data['email'], getConfig('updatesubject'), $oldaddressmessage, system_messageheaders($email), $envelope) && sendMail($email, getConfig('updatesubject'), $newaddressmessage, system_messageheaders($email), $envelope)) {
$ok = 1;
sendAdminCopy('Lists information changed', "\n" . $data['email'] . " has changed their information.\n\nThe email has changed to {$email}.\n\n{$history_entry}", $subscriptions);
addUserHistory($email, '
|
请发表评论