本文整理汇总了PHP中SJB_Request::getString方法的典型用法代码示例。如果您正苦于以下问题:PHP SJB_Request::getString方法的具体用法?PHP SJB_Request::getString怎么用?PHP SJB_Request::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SJB_Request
的用法示例。
在下文中一共展示了SJB_Request::getString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
$this->_fieldSID = SJB_Request::getInt('id');
$this->_fieldName = SJB_Request::getString('name');
$this->_search = SJB_Request::getString('search');
$this->_displayAsSelectBoxes = $this->defineTreeProperty('display_as_select_boxes', $this->_fieldSID);
$this->_checked = $this->prepareCheckedItems();
if ($this->_displayAsSelectBoxes && !empty($this->_checked[0]) && count($this->_checked) === 1) {
$this->_checked = $this->getCheckedItems($this->_checked[0]);
}
$this->_sortByAlphabet = $this->defineTreeProperty('sort_by_alphabet', $this->_fieldSID);
}
示例2: loadPlugin
public static function loadPlugin($network, $object)
{
if (!isset(self::$loadedPlugins[$network])) {
self::$loadedPlugins[$network] = $object;
}
$requestedNetwork = SJB_Request::getString('network');
if ($requestedNetwork === $network) {
if (SJB_Request::getVar('returnToShoppingCart', false)) {
SJB_Session::setValue('fromAnonymousShoppingCart', true);
}
self::$oSocialPlugin = self::getSocialPlugin($network);
self::$oSocialPlugin->init();
}
}
示例3: execute
//.........这里部分代码省略.........
} else {
$where_state[] .= "`u`.`Location_State` IS NULL";
}
}
}
if (!empty($where_state)) {
$where .= ' AND (' . implode(' OR ', $where_state) . ')';
}
if (!empty($param['city'])) {
$where .= " AND `u`.`Location_City` = '{$param['city']}'";
}
}
$mail_list[$key]['not_send'] = $numSentEmails;
$mail_list[$key]['mail_arr'] = SJB_DB::query("\n SELECT u.sid as sid, u.username, u.user_group_sid, u.language\n FROM users u\n {$join}\n WHERE u.sendmail = 0\n {$where}\n GROUP BY `u`.`sid`");
$mail_list[$key]['count'] = count($mail_list[$key]['mail_arr']);
}
/*
* test sending
*/
$testMailingID = SJB_Request::getVar('test_send', 0);
if ($testMailingID) {
if ($this->isTestEmailValid()) {
$testSendResult = false;
$oMailing = new SJB_Mailing($testMailingID);
$mailings = SJB_Request::getVar('mailing');
if (is_array($mailings)) {
foreach ($mailings as $id => $value) {
$oMailing->setMailingID($id);
$oMailing->setMailingList($mail_list);
if ($oMailing->testSend()) {
$testSendResult = true;
}
}
} else {
$oMailing->setMailingList($mail_list);
$testSendResult = $oMailing->testSend();
}
if ($testSendResult) {
SJB_HelperFunctions::redirect(SJB_System::getSystemSettings('SITE_URL') . '/mailing/?test_message=1');
} else {
$email = urlencode(SJB_Request::getString('email', false));
SJB_HelperFunctions::redirect(SJB_System::getSystemSettings('SITE_URL') . "/mailing/?undeliveredMailingsForTest={$email}");
}
} else {
$tp->assign('testEmailNotValid', true);
}
}
// general sending
$sendToMailingID = SJB_Request::getVar('sending', 0);
$sendResult = false;
if ($sendToMailingID) {
$oMailing = new SJB_Mailing($sendToMailingID);
$mailings = SJB_Request::getVar('mailing');
$undeliveredMailingsInfo = array();
if (is_array($mailings)) {
foreach ($mailings as $id => $value) {
$oMailing->setMailingID($id);
$oMailing->setMailingList($mail_list);
$countOfSendMailings = $oMailing->send();
if ($countOfSendMailings != 0) {
$sendResult = true;
}
$undeliveredMailingsInfo = array_merge($oMailing->getUndeliveredMailingsInfo(), $undeliveredMailingsInfo);
}
} else {
$oMailing->setMailingList($mail_list);
$countOfSendMailings = $oMailing->send();
if ($countOfSendMailings != 0) {
$sendResult = true;
}
$undeliveredMailingsInfo = $oMailing->getUndeliveredMailingsInfo();
}
if ($sendResult) {
$tp->assign('send_result', $sendResult);
}
if (count($undeliveredMailingsInfo)) {
$tp->assign("UndeliveredMailings", $oMailing->getUndeliveredMailingsInfo());
}
}
// send mailing to undelivered
$sendToUndeliveredMailingID = SJB_Request::getVar('sendToUndeliveredEmails', 0);
if (!empty($sendToUndeliveredMailingID)) {
$oMailing = new SJB_Mailing($sendToUndeliveredMailingID);
$oMailing->setMailingList($mail_list);
$oMailing->sendToUndelivered();
if ($oMailing->getUndeliveredMailingsInfo()) {
$tp->assign("UndeliveredMailings", $oMailing->getUndeliveredMailingsInfo());
}
}
$groups = SJB_DB::query("SELECT * FROM `user_groups`");
$products = SJB_ProductsManager::getAllProductsInfo();
$testEmail = SJB_Settings::getSettingByName('test_email');
$tp->assign('test_email', $testEmail);
$tp->assign("products", $products);
$tp->assign("groups", $groups);
$tp->assign("mail_list", $mail_list);
$tp->assign('errors', $errors);
$tp->assign("uploadMaxFilesize", SJB_UploadFileManager::getIniUploadMaxFilesize());
$tp->display("mailing.tpl");
}