本文整理汇总了PHP中strip_quotes函数的典型用法代码示例。如果您正苦于以下问题:PHP strip_quotes函数的具体用法?PHP strip_quotes怎么用?PHP strip_quotes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了strip_quotes函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:30,代码来源:comment.php
示例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;
}
}
开发者ID:triasfahrudin,项目名称:pct-project,代码行数:30,代码来源:userControllerSiku.php
示例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();
}
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:27,代码来源:visitormessage.php
示例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));
}
}
开发者ID:saiful1105020,项目名称:Under-Construction-Bracathon-Project-,代码行数:7,代码来源:string_helper_test.php
示例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;
}
开发者ID:patrickrolanddg,项目名称:dragonfly-tapatalk,代码行数:11,代码来源:common.php
示例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();
}
}
开发者ID:jin255ff,项目名称:company_website,代码行数:52,代码来源:rcmail.php
示例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();
}
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:18,代码来源:entry.php
示例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;
}
}
开发者ID:triasfahrudin,项目名称:pct-project,代码行数:18,代码来源:userControllerSiam.php
示例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);
}
}
开发者ID:hfugen112678,项目名称:webforms,代码行数:26,代码来源:Disputes.php
示例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;
}
}
开发者ID:triasfahrudin,项目名称:pct-project,代码行数:20,代码来源:userControllerSiab.php
示例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();
}
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:41,代码来源:post.php
示例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;
}
开发者ID:elurofilico,项目名称:i-MSCP-plugins,代码行数:21,代码来源:sauserprefs.php
示例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;
}
开发者ID:h9k,项目名称:listcommands,代码行数:22,代码来源:listcommands.php
示例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');
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:showthread.php
示例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();
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:calendar.php
示例16: substr
cacti_log("Host[$host_id] DS[$data_source] WARNING: Result from CMD not valid. Partial Result: " . substr($output, 0, $strout), $print_data_to_stdout);
$output = "U";
}
if (read_config_option("log_verbosity") >= POLLER_VERBOSITY_MEDIUM) {
cacti_log("Host[$host_id] DS[$data_source] CMD: " . $item["arg1"] . ", output: $output",$print_data_to_stdout);
}
break;
case POLLER_ACTION_SCRIPT_PHP: /* script (php script server) */
if ($using_proc_function == true) {
$output = trim(str_replace("\n", "", exec_poll_php($item["arg1"], $using_proc_function, $pipes, $cactiphp)));
/* remove any quotes from string */
$output = strip_quotes($output);
if (!validate_result($output)) {
if (strlen($output) > 20) {
$strout = 20;
} else {
$strout = strlen($output);
}
cacti_log("Host[$host_id] DS[$data_source] WARNING: Result from SERVER not valid. Partial Result: " . substr($output, 0, $strout), $print_data_to_stdout);
$output = "U";
}
if (read_config_option("log_verbosity") >= POLLER_VERBOSITY_MEDIUM) {
cacti_log("Host[$host_id] DS[$data_source] SERVER: " . $item["arg1"] . ", output: $output", $print_data_to_stdout);
}
开发者ID:songchin,项目名称:Cacti,代码行数:30,代码来源:cmd.php
示例17: strip_quotes
<meta name="description" content="<?php
echo strip_quotes($description_for_layout);
?>
" />
<meta name="keywords" content="<?php
echo strip_quotes($keyword_for_layout);
?>
" />
<meta name="ROBOTS" content="index, follow" />
<meta property="og:title" content="<?php
echo $title_for_layout;
?>
">
<meta property="og:type" content="website">
<meta property="og:description" content="<?php
echo strip_quotes($description_for_layout);
?>
" />
<meta property="fb:app_id" content="<?php
echo FACEBOOK_APP_ID;
?>
" />
<meta property="og:image" content="<?php
echo $image_for_layout;
?>
" />
<meta property="og:site_name" content="<?php
echo SITE_NAME;
?>
" />
<meta property="og:url" content="<?php
开发者ID:pdkhuong,项目名称:VideoFW,代码行数:31,代码来源:head.php
示例18: append_port
function append_port($host, &$port)
{
$host = trim($host);
// empty port or zero-length host
if (!nonempty($port) || !strlen($host)) {
return $host;
}
$port = trim(strval($port));
$s = strip_quotes($port);
if (strlen($s) && is_num($s)) {
$s = ":" . $s;
} else {
$s = "";
}
return $host . $s;
}
开发者ID:captincook,项目名称:Pony,代码行数:16,代码来源:misc.php
示例19: do_get_post
function do_get_post()
{
global $vbulletin, $db, $foruminfo, $threadinfo, $postid, $postinfo;
$vbulletin->input->clean_array_gpc('r', array('type' => TYPE_STR));
$type = 'html';
if ($vbulletin->GPC['type']) {
$type = $vbulletin->GPC['type'];
}
if (!$postinfo['postid']) {
standard_error(fetch_error('invalidid', $vbphrase['post'], $vbulletin->options['contactuslink']));
}
if ((!$postinfo['visible'] or $postinfo['isdeleted']) and !can_moderate($threadinfo['forumid'])) {
standard_error(fetch_error('invalidid', $vbphrase['post'], $vbulletin->options['contactuslink']));
}
if ((!$threadinfo['visible'] or $threadinfo['isdeleted']) and !can_moderate($threadinfo['forumid'])) {
standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink']));
}
$forumperms = fetch_permissions($threadinfo['forumid']);
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads'])) {
json_error(ERR_NO_PERMISSION);
}
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($threadinfo['postuserid'] != $vbulletin->userinfo['userid'] or $vbulletin->userinfo['userid'] == 0)) {
json_error(ERR_NO_PERMISSION);
}
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
$postbit_factory = new vB_Postbit_Factory();
$postbit_factory->registry =& $vbulletin;
$postbit_factory->forum =& $foruminfo;
$postbit_factory->cache = array();
$postbit_factory->bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
$post = $db->query_first_slave("\n\tSELECT\n\tpost.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,\n\t user.*, userfield.*, usertextfield.*,\n\t " . iif($foruminfo['allowicons'], 'icon.title as icontitle, icon.iconpath,') . "\n\t IF(user.displaygroupid=0, user.usergroupid, user.displaygroupid) AS displaygroupid, infractiongroupid,\n\t\t" . iif($vbulletin->options['avatarenabled'], 'avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,') . "\n\t\t" . ((can_moderate($threadinfo['forumid'], 'canmoderateposts') or can_moderate($threadinfo['forumid'], 'candeleteposts')) ? 'spamlog.postid AS spamlog_postid,' : '') . "\n\t\teditlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline, editlog.reason AS edit_reason, editlog.hashistory,\n\t\tpostparsed.pagetext_html, postparsed.hasimages,\n\t\tsigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,\n\t\tsigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight\n\t\t" . iif(!($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), $vbulletin->profilefield['hidden']) . "\n\t\t{$hook_query_fields}\n\t\tFROM " . TABLE_PREFIX . "post AS post\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid = user.userid)\n\t\t" . iif($foruminfo['allowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = post.iconid)") . "\n\t\t" . iif($vbulletin->options['avatarenabled'], "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)") . "\n\t\t" . ((can_moderate($threadinfo['forumid'], 'canmoderateposts') or can_moderate($threadinfo['forumid'], 'candeleteposts')) ? "LEFT JOIN " . TABLE_PREFIX . "spamlog AS spamlog ON(spamlog.postid = post.postid)" : '') . "\n\t\tLEFT JOIN " . TABLE_PREFIX . "editlog AS editlog ON(editlog.postid = post.postid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = " . intval(STYLEID) . " AND postparsed.languageid = " . intval(LANGUAGEID) . ")\n\t\tLEFT JOIN " . TABLE_PREFIX . "sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = " . intval(STYLEID) . " AND sigparsed.languageid = " . intval(LANGUAGEID) . ")\n\t\tLEFT JOIN " . TABLE_PREFIX . "sigpic AS sigpic ON(sigpic.userid = post.userid)\n\t\t{$hook_query_joins}\n\t\tWHERE post.postid = {$postid}\n ");
$types = vB_Types::instance();
$contenttypeid = $types->getContentTypeID('vBForum_Post');
$attachments = $db->query_read_slave("\n\t\tSELECT\n\t\t\tfd.thumbnail_dateline, fd.filesize, IF(fd.thumbnail_filesize > 0, 1, 0) AS hasthumbnail, fd.thumbnail_filesize,\n\t\t\ta.dateline, a.state, a.attachmentid, a.counter, a.contentid AS postid, a.filename,\n\t\t\ttype.contenttypes\n\t\tFROM " . TABLE_PREFIX . "attachment AS a\n\t\tINNER JOIN " . TABLE_PREFIX . "filedata AS fd ON (a.filedataid = fd.filedataid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "attachmenttype AS type ON (fd.extension = type.extension)\n\t\tWHERE\n\t\t\ta.contentid = {$postid}\n\t\t\t\tAND\n\t\t\ta.contenttypeid = {$contenttypeid}\n\t\tORDER BY a.attachmentid\n\t");
$fr_images = array();
while ($attachment = $db->fetch_array($attachments)) {
$lfilename = strtolower($attachment['filename']);
if (strpos($lfilename, '.jpe') !== false || strpos($lfilename, '.png') !== false || strpos($lfilename, '.gif') !== false || strpos($lfilename, '.jpg') !== false || strpos($lfilename, '.jpeg') !== false) {
$tmp = array('img' => $vbulletin->options['bburl'] . '/attachment.php?attachmentid=' . $attachment['attachmentid']);
if ($vbulletin->options['attachthumbs']) {
$tmp['tmb'] = $vbulletin->options['bburl'] . '/attachment.php?attachmentid=' . $attachment['attachmentid'] . '&stc=1&thumb=1';
}
$fr_images[] = $tmp;
}
}
$postbits = '';
$postbit_obj =& $postbit_factory->fetch_postbit('post');
$postbit_obj->cachable = $post_cachable;
$postbits .= $postbit_obj->construct_postbit($post);
if ($type == 'html') {
$bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
$vbulletin->templatecache['bbcode_quote'] = '
<div style=\\"margin:0px; margin-top:0px;\\">
<table cellpadding=\\"$stylevar[cellpadding]\\" cellspacing=\\"0\\" border=\\"0\\" width=\\"100%\\">
<tr>
<td class=\\"alt2\\" style=\\"border:1px solid #777777;\\">
".(($show[\'username\']) ? ("
<div>
" . construct_phrase("$vbphrase[originally_posted_by_x]", "$username") . "
</div>
<div style=\\"font-style:italic\\">$message</div>
") : ("
$message
"))."
</td>
</tr>
</table>
</div>
';
$css = <<<EOF
<style type="text/css">
body {
margin: 0;
padding: 3;
font: 13px Arial, Helvetica, sans-serif;
}
.alt2 {
background-color: #e6edf5;
font: 13px Arial, Helvetica, sans-serif;
}
html {
-webkit-text-size-adjust: none;
}
</style>
EOF;
$html = $css . $bbcode_parser->parse($post['pagetext']);
$image = '';
} else {
if ($type == 'facebook') {
$html = fetch_censored_text(strip_bbcode(strip_quotes($post['pagetext']), false, true));
if (count($fr_images)) {
$image = $fr_images[0]['img'];
}
}
}
// Figure out if we can post
$canpost = true;
if ($threadinfo['isdeleted'] or !$threadinfo['visible'] and !can_moderate($threadinfo['forumid'], 'canmoderateposts')) {
$canpost = false;
//.........这里部分代码省略.........
开发者ID:0hyeah,项目名称:yurivn,代码行数:101,代码来源:get_thread.php
示例20: get_words_rate
/**
* возвращает "показатель полезности" сообщения используемый для автоудаления коротких сообщений типа "спасибо", "круто" и т.д.
*/
function get_words_rate($text)
{
$this->words_rate = 127;
// максимальное значение по умолчанию
$this->deleted_words = array();
$this->del_text_hl = $text;
// длинное сообщение
if (strlen($text) > 600) {
return $this->words_rate;
}
// вырезаем цитаты если содержит +1
if (preg_match('#\\+\\d+#', $text)) {
$text = strip_quotes($text);
}
// содержит ссылку
if (strpos($text, '://')) {
return $this->words_rate;
}
// вопрос
if ($questions = preg_match_all('#\\w\\?+#', $text, $m)) {
if ($questions >= 1) {
return $this->words_rate;
}
}
if ($this->dbg_mode) {
preg_match_all($this->words_del_exp, $text, $this->deleted_words);
$text_dbg = preg_replace($this->words_del_exp, '<span class="del-word">$0</span>', $text);
$this->del_text_hl = '<div class="prune-post">' . $text_dbg . '</div>';
}
$text = preg_replace($this->words_del_exp, '', $text);
// удаление смайлов
$text = preg_replace('#:\\w+:#', '', $text);
// удаление bbcode тегов
$text = preg_replace('#\\[\\S+\\]#', '', $text);
$words_count = preg_match_all($this->words_cnt_exp, $text, $m);
if ($words_count !== false && $words_count < 127) {
$this->words_rate = $words_count == 0 ? 1 : $words_count;
}
return $this->words_rate;
}
开发者ID:ErR163,项目名称:torrentpier,代码行数:43,代码来源:bbcode.php
注:本文中的strip_quotes函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论