本文整理汇总了PHP中strip_quotes函数的典型用法代码示例。如果您正苦于以下问题:PHP strip_quotes函数的具体用法?PHP strip_quotes怎么用?PHP strip_quotes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了strip_quotes函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchTemplate
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
{
$postinfo =& $this->content['cms_post'][$activity['contentid']];
$nodeinfo =& $this->content['cms_node'][$postinfo['nodeid']];
$articleinfo =& $this->content['cms_article'][$nodeinfo['contentid']];
$activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
$activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
$preview = strip_quotes($postinfo['pagetext']);
$articleinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
$articleinfo['fullurl'] = vB_Route::create('vBCms_Route_Content', $nodeinfo['nodeid'] . ($nodeinfo['url'] == '' ? '' : '-' . $nodeinfo['url']))->getCurrentURL();
$nodeinfo['parenturl'] = $this->fetchParentUrl($nodeinfo['parentnode']);
$nodeinfo['parenttitle'] = $this->fetchParentTitle($nodeinfo['parentnode']);
$userinfo = $this->fetchUser($activity['userid'], $postinfo['username']);
if ($fetchphrase) {
if ($userinfo['userid']) {
$phrase = construct_phrase($this->vbphrase['x_commented_on_an_article_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], $articleinfo['fullurl'], $nodeinfo['title'], $nodeinfo['parenturl'], $nodeinfo['parenttitle']);
} else {
$phrase = construct_phrase($this->vbphrase['guest_x_commented_on_an_article_y_in_z'], $userinfo['username'], $articleinfo['fullurl'], $nodeinfo['title'], $nodeinfo['parenturl'], $nodeinfo['parenttitle']);
}
return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
} else {
$templater = vB_Template::create($templatename);
$templater->register('userinfo', $userinfo);
$templater->register('postinfo', $postinfo);
$templater->register('activity', $activity);
$templater->register('nodeinfo', $nodeinfo);
$templater->register('articleinfo', $articleinfo);
return $templater->render();
}
}
示例2: checkLoginData
function checkLoginData()
{
$this->load->model("user_model");
$postUsername = strip_quotes($this->input->post('username'));
$postPassword = $this->security->xss_clean($this->input->post('password'));
$dataLogin = $this->user_model->getDataLogin($postUsername);
if ($dataLogin->num_rows() > 0) {
$dataLogin = $dataLogin->row();
if (md5($dataLogin->PASSWORD) == md5($postPassword)) {
$ua = $_SERVER['HTTP_USER_AGENT'];
if (strpos($ua, 'MSIE') != false && strpos($ua, 'Opera') === false) {
if (strpos($ua, 'Windows NT 5.2') != false) {
if (strpos($ua, '.NET CLR') === false) {
return;
}
}
if (substr($ua, strpos($ua, 'MSIE') + 5, 1) < 7) {
redirect('change-your-browser', 'location');
}
}
$sessionData = array('siku_user_username' => $postUsername, 'siku_user_id' => $dataLogin->ID);
$this->session->set_userdata($sessionData);
return TRUE;
} else {
return FALSE;
}
} else {
return FALSE;
}
}
示例3: fetchTemplate
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
{
$messageinfo =& $this->content['visitormessage'][$activity['contentid']];
$activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
$activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
$userinfo2 =& $this->content['user'][$messageinfo['userid']];
$messageinfo['preview'] = strip_quotes($messageinfo['pagetext']);
$messageinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($messageinfo['preview'], false, true, true, true), vb::$vbulletin->options['as_snippet'])));
$userinfo = $this->fetchUser($activity['userid'], $messageinfo['postusername']);
if ($fetchphrase) {
if ($userinfo['userid']) {
$phrase = construct_phrase($this->vbphrase['x_created_a_visitormessage_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']);
} else {
$phrase = construct_phrase($this->vbphrase['guest_x_created_a_visitormessage_y_in_z'], $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']);
}
return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
} else {
$templater = vB_Template::create($templatename);
$templater->register('userinfo', $userinfo);
$templater->register('userinfo2', $userinfo2);
$templater->register('linkinfo', array('vmid' => $messageinfo['vmid']));
$templater->register('linkinfo2', array('tab' => 'visitor_messaging'));
$templater->register('activity', $activity);
$templater->register('messageinfo', $messageinfo);
return $templater->render();
}
}
示例4: test_strip_quotes
public function test_strip_quotes()
{
$strs = array('"me oh my!"' => 'me oh my!', "it's a winner!" => 'its a winner!');
foreach ($strs as $str => $expect) {
$this->assertEquals($expect, strip_quotes($str));
}
}
示例5: mobiquo_chop
function mobiquo_chop($string)
{
global $stylevar, $vbulletin;
$string = preg_replace('/<br \\/\\>/', '', $string);
$string = preg_replace('/(^\\s+)|(\\s+$)/', '', $string);
$string = preg_replace('/\\n/', '', $string);
$string = preg_replace('/\\r/', '', $string);
$string = strip_quotes($string);
$string = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($string, false, true), 200)));
return $string;
}
示例6: startup
/**
* Initial startup function
* to register session, create database and imap connections
*
* @todo Remove global vars $DB, $USER
*/
private function startup()
{
$config_all = $this->config->all();
// initialize syslog
if ($this->config->get('log_driver') == 'syslog') {
$syslog_id = $this->config->get('syslog_id', 'roundcube');
$syslog_facility = $this->config->get('syslog_facility', LOG_USER);
openlog($syslog_id, LOG_ODELAY, $syslog_facility);
}
// set task and action properties
$this->set_task(strip_quotes(get_input_value('_task', RCUBE_INPUT_GPC)));
$this->action = asciiwords(get_input_value('_action', RCUBE_INPUT_GPC));
// connect to database
$GLOBALS['DB'] = $this->get_dbh();
// use database for storing session data
include_once 'include/session.inc';
// set session domain
if (!empty($config_all['session_domain'])) {
ini_set('session.cookie_domain', $config_all['session_domain']);
}
// set session garbage collecting time according to session_lifetime
if (!empty($config_all['session_lifetime'])) {
ini_set('session.gc_maxlifetime', $config_all['session_lifetime'] * 120);
}
// start PHP session (if not in CLI mode)
if ($_SERVER['REMOTE_ADDR']) {
session_start();
}
// set initial session vars
if (!isset($_SESSION['auth_time'])) {
$_SESSION['auth_time'] = time();
$_SESSION['temp'] = true;
}
// create user object
$this->set_user(new rcube_user($_SESSION['user_id']));
// reset some session parameters when changing task
if ($_SESSION['task'] != $this->task) {
unset($_SESSION['page']);
}
// set current task to session
$_SESSION['task'] = $this->task;
// create IMAP object
if ($this->task == 'mail') {
$this->imap_init();
}
}
示例7: fetchTemplate
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
{
$userinfo =& $this->content['user'][$activity['userid']];
$bloginfo =& $this->content['blog'][$activity['contentid']];
$activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
$activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
$preview = strip_quotes($bloginfo['pagetext']);
$bloginfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
if ($fetchphrase) {
return array('phrase' => construct_phrase($this->vbphrase['x_created_a_blog_entry_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('entry', $bloginfo), $bloginfo['title'], fetch_seo_url('blog', $bloginfo), $bloginfo['blog_title']), 'userinfo' => $userinfo, 'activity' => $activity);
} else {
$templater = vB_Template::create($templatename);
$templater->register('userinfo', $userinfo);
$templater->register('activity', $activity);
$templater->register('bloginfo', $bloginfo);
return $templater->render();
}
}
示例8: checkLoginData
function checkLoginData()
{
$dataLogin = $this->user_model->getDataLogin(strip_quotes($this->input->post('username')));
if ($dataLogin->num_rows() > 0) {
$dataLogin = $dataLogin->row();
if ($dataLogin->PASSWORD == md5($this->security->xss_clean($this->input->post('password')))) {
$this->browser_check->checkUserAgent();
$viewKontrolData = $this->system_model->getViewKontrolData($dataLogin->PRODI);
$sessionData = array('siamunp_user' => $this->security->xss_clean($this->input->post('username')), 'siamunp_user_status' => $dataLogin->STATUS, 'siamunp_user_prodi' => $dataLogin->PRODI, 'siamunp_user_nama' => $dataLogin->NAMA, 'siamunp_user_nim' => $dataLogin->NIM, 'siamunp_user_namaprodi' => $dataLogin->NAMA_PRODI, 'system_semester' => $viewKontrolData->KODE_SEMESTER, 'system_tahun_ajaran' => $viewKontrolData->KODE_TAHUN, 'system_status' => $viewKontrolData->KODE_STATUS);
$this->session->set_userdata($sessionData);
return TRUE;
} else {
return FALSE;
}
} else {
return FALSE;
}
}
示例9: adjustment_listing
/**
* Display employee adjustments
*
* @param int $employeenumber
* @return mixed
*/
public function adjustment_listing($employeenumber)
{
$params = array('header' => $this->_adjheaders, 'class' => array('table table-striped table-bordered dt-table'));
$empty[] = array('No results found.', '', '', '', '', '', '', '');
$this->_ci->load->library('MY_table', $params, 'adjustments');
$this->_ci->employeedisputes->EmployeeNumber = $employeenumber;
$adjustments = $this->_ci->employeedisputes->get();
if (isset($adjustments) && !empty($adjustments)) {
for ($i = 0; $i < count($adjustments); $i++) {
$tabledata[] = array($this->_empdispute_modal('adjustments/view/', $adjustments[$i]->ID), sprintf('%01.2f', $adjustments[$i]->AdjustmentAmt), $this->_adjtypes[$adjustments[$i]->Type], convert_date($adjustments[$i]->DateOccurred, 'M d, Y'), convert_date($adjustments[$i]->PeriodStart, 'M d, Y'), convert_date($adjustments[$i]->PeriodEnd, 'M d, Y'), strip_quotes(substr($adjustments[$i]->Remarks, 0, 12)), $this->_adjstatus[$adjustments[$i]->Status]);
}
if (isset($tabledata) && !empty($tabledata)) {
return $this->_ci->adjustments->generate($tabledata);
} else {
return $this->_ci->adjustments->generate($empty);
}
} else {
return $this->_ci->adjustments->generate($empty);
}
}
示例10: checkLoginData
function checkLoginData()
{
$this->load->model("user_model");
$postUsername = strip_quotes($this->input->post('username'));
$postPassword = $this->security->xss_clean($this->input->post('password'));
$dataLogin = $this->user_model->getDataLogin($postUsername);
if ($dataLogin->num_rows() > 0) {
$dataLogin = $dataLogin->row();
if (md5($dataLogin->PASSWORD) == md5($postPassword)) {
$viewKontrolData = $this->user_model->getViewKontrolData($dataLogin->PRODI);
$sessionData = array('siab_user_username' => $postUsername, 'siab_user_kode_prodi' => $dataLogin->PRODI, 'siab_user_nama_prodi' => $dataLogin->NAMA_PRODI, 'siab_user_level' => $dataLogin->LEVEL, 'siab_system_semester' => $viewKontrolData->KODE_SEMESTER, 'siab_system_tahun_ajaran' => $viewKontrolData->KODE_TAHUN, 'siab_system_status' => $viewKontrolData->KODE_STATUS);
$this->session->set_userdata($sessionData);
return TRUE;
} else {
return FALSE;
}
} else {
return FALSE;
}
}
示例11: fetchTemplate
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
{
global $show;
$postinfo =& $this->content['post'][$activity['contentid']];
$threadinfo =& $this->content['thread'][$postinfo['threadid']];
$foruminfo =& vB::$vbulletin->forumcache[$threadinfo['forumid']];
$threadinfo['prefix_plain_html'] = htmlspecialchars_uni($this->vbphrase["prefix_{$threadinfo['prefixid']}_title_plain"]);
$threadinfo['prefix_rich'] = $this->vbphrase["prefix_{$threadinfo['prefixid']}_title_rich"];
$activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
$activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
$preview = strip_quotes($postinfo['pagetext']);
$postinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
$forumperms = fetch_permissions($threadinfo['forumid']);
$show['threadcontent'] = $forumperms & vB::$vbulletin->bf_ugp_forumpermissions['canviewthreads'] ? true : false;
$userinfo = $this->fetchUser($activity['userid'], $postinfo['username']);
if ($fetchphrase) {
if ($threadinfo['pollid']) {
if ($userinfo['userid']) {
$phrase = construct_phrase($this->vbphrase['x_replied_to_a_poll_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
} else {
$phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_poll_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
}
} else {
if ($userinfo['userid']) {
$phrase = construct_phrase($this->vbphrase['x_replied_to_a_thread_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
} else {
$phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_thread_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
}
}
return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
} else {
$templater = vB_Template::create($templatename);
$templater->register('userinfo', $userinfo);
$templater->register('activity', $activity);
$templater->register('threadinfo', $threadinfo);
$templater->register('postinfo', $postinfo);
$templater->register('pageinfo', array('p' => $postinfo['postid']));
$templater->register('foruminfo', $foruminfo);
return $templater->render();
}
}
示例12: section_list
function section_list($attrib)
{
$no_override = array_flip(rcube::get_instance()->config->get('sauserprefs_dont_override'));
// add id to message list table if not specified
if (!strlen($attrib['id'])) {
$attrib['id'] = 'rcmsectionslist';
}
$sections = array();
$blocks = $attrib['sections'] ? preg_split('/[\\s,;]+/', strip_quotes($attrib['sections'])) : array_keys($this->sections);
foreach ($blocks as $block) {
if (!isset($no_override['{' . $block . '}'])) {
$sections[$block] = $this->sections[$block];
}
}
// create XHTML table
$out = rcube::get_instance()->table_output($attrib, $sections, array('section'), 'id');
// set client env
$this->api->output->add_gui_object('sectionslist', $attrib['id']);
$this->api->output->include_script('list.js');
return $out;
}
示例13: create_link
private function create_link($key, $value, $title)
{
$proto = "";
// some headers have multiple targets
$targets = explode(',', $value);
// only use 1 of the targets
$target = strip_quotes($targets[0]);
// first strip angle brackets
$link = trim($target, "<>");
if (preg_match('/^(mailto|http|https)(:\\/\\/|:)(.*)$/', $link, $matches)) {
$proto = $matches[1];
$target = $matches[3];
}
// use RC for emailing instead of relying on the mailto header
if ($proto == "mailto") {
$onclick = "return rcmail.command('compose','{$target}',this)";
} else {
$onclick = "";
}
$a = html::a(array('href' => $link, 'target' => '_blank', 'onclick' => $onclick), $title);
return $a;
}
示例14: fetch_permissions
}
$forum_active_cache["{$current_forum['forumid']}"] = true;
$current_forum = $vbulletin->forumcache["{$current_forum['parentid']}"];
}
}
if (!$forum_active_cache["{$simthread['forumid']}"]) {
continue;
}
$fperms = fetch_permissions($simthread['forumid']);
if ($fperms & $vbulletin->bf_ugp_forumpermissions['canview'] and ($fperms & $vbulletin->bf_ugp_forumpermissions['canviewothers'] or $vbulletin->userinfo['userid'] != 0 and $simthread['postuserid'] == $vbulletin->userinfo['userid'])) {
// format thread preview if there is one
if (isset($ignore["{$simthread['postuserid']}"])) {
$simthread['preview'] = '';
} else {
if (isset($simthread['preview']) and $vbulletin->options['threadpreview'] > 0) {
$simthread['preview'] = strip_quotes($simthread['preview']);
$simthread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($simthread['preview'], false, true), $vbulletin->options['threadpreview']));
}
}
$simthread['lastreplydate'] = vbdate($vbulletin->options['dateformat'], $simthread['lastpost'], true);
$simthread['lastreplytime'] = vbdate($vbulletin->options['timeformat'], $simthread['lastpost']);
if ($simthread['prefixid']) {
$simthread['prefix_plain_html'] = htmlspecialchars_uni($vbphrase["prefix_{$simthread['prefixid']}_title_plain"]);
$simthread['prefix_rich'] = $vbphrase["prefix_{$simthread['prefixid']}_title_rich"];
} else {
$simthread['prefix_plain_html'] = '';
$simthread['prefix_rich'] = '';
}
$simthread['title'] = fetch_censored_text($simthread['title']);
($hook = vBulletinHook::fetch_hook('showthread_similarthreadbit')) ? eval($hook) : false;
$templater = vB_Template::create('showthread_similarthreadbit');
示例15: while
$first = $itemcount + 1;
if ($db->num_rows($getevents)) {
$show['haveevents'] = true;
while ($event = $db->fetch_array($getevents)) {
if (empty($reminders["{$event['reminder']}"])) {
$event['reminder'] = 3600;
}
$event['reminder'] = $vbphrase[$reminders[$event['reminder']]];
$offset = $event['dst'] ? $vbulletin->userinfo['timezoneoffset'] : $vbulletin->userinfo['tzoffset'];
$event = array_merge($event, convert_bits_to_array($event['options'], $vbulletin->bf_misc_useroptions));
$event = array_merge($event, convert_bits_to_array($event['adminoptions'], $vbulletin->bf_misc_adminoptions));
cache_permissions($event, false);
fetch_avatar_from_userinfo($event, true);
$event['dateline_from_user'] = $event['dateline_from'] + $offset * 3600;
$event['dateline_to_user'] = $event['dateline_to'] + $offset * 3600;
$event['preview'] = htmlspecialchars_uni(strip_bbcode(fetch_trimmed_title(strip_quotes($event['event']), 300), false, true));
$event = fetch_event_date_time($event);
$event['calendar'] = $calendarcache["{$event['calendarid']}"];
$show['singleday'] = !empty($event['singleday']) ? true : false;
($hook = vBulletinHook::fetch_hook('calendar_viewreminder_event')) ? eval($hook) : false;
$oppositesort = $sortorder == 'asc' ? 'desc' : 'asc';
$templater = vB_Template::create('calendar_reminder_eventbit');
$templater->register('date1', $date1);
$templater->register('date2', $date2);
$templater->register('daterange', $daterange);
$templater->register('event', $event);
$templater->register('eventdate', $eventdate);
$templater->register('recurcriteria', $recurcriteria);
$templater->register('time1', $time1);
$templater->register('time2', $time2);
$eventbits .= $templater->render();