本文整理汇总了PHP中osc_base_url函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_base_url函数的具体用法?PHP osc_base_url怎么用?PHP osc_base_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_base_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: minify_clean_url
/**
* Sanitize the file url removing the base url
* @param array $urls
* @return array Urls
*/
function minify_clean_url(array $urls)
{
foreach ($urls as &$url) {
$url = str_replace(osc_base_url(), '/', $url);
}
return $urls;
}
开发者ID:oanav,项目名称:closetshare,代码行数:12,代码来源:index.php
示例2: new_pm_email
/**
* Send email to user when they get a new PM
*
* @param integer $item
* @param integer $offer_value
*
* @dynamic tags
*
* '{RECIP_NAME}', '{SENDER_NAME}', '{WEB_URL}', '{WEB_TITLE}', '{PM_URL}', '{PM_SUBJECT}', '{PM_MESSAGE}'
*/
function new_pm_email($pm_info)
{
$mPages = new Page();
$aPage = $mPages->findByInternalName('email_PM_alert');
$locale = osc_current_user_locale();
$content = array();
if (isset($aPage['locale'][$locale]['s_title'])) {
$content = $aPage['locale'][$locale];
} else {
$content = current($aPage['locale']);
}
if ($pm_info['sender_id'] == 0) {
$sender_name = pmAdmin();
} else {
$pm_senderData = User::newInstance()->findByPrimaryKey($pm_info['sender_id']);
$sender_name = $pm_senderData['s_name'];
}
if ($pm_info['recip_id'] == 0) {
$pm_url = osc_admin_base_url(true) . '?page=plugins&action=renderplugin&file=osclass_pm/admin-send.php?userId=' . $pm_info['sender_id'] . '&mType=adminQuote&messId=' . $pm_info['pm_id'];
$pm_name = pmAdmin();
$pm_recipData['s_email'] = osc_contact_email();
} else {
$pm_url = osc_base_url(true) . '?page=custom&file=osclass_pm/user-send.php?userId=' . $pm_info['sender_id'] . '&mType=quote&messId=' . $pm_info['pm_id'];
$pm_recipData = User::newInstance()->findByPrimaryKey($pm_info['recip_id']);
$pm_name = $pm_recipData['s_name'];
}
$pm_url = '<a href="' . $pm_url . '" >' . $pm_url . '</a>';
$words = array();
$words[] = array('{RECIP_NAME}', '{SENDER_NAME}', '{WEB_URL}', '{WEB_TITLE}', '{PM_URL}', '{PM_SUBJECT}', '{PM_MESSAGE}', '[quote]', '[/quote]', '[quoteAuthor]', '[/quoteAuthor]');
$words[] = array($pm_name, $sender_name, osc_base_url(), osc_page_title(), $pm_url, $pm_info['pm_subject'], nl2br($pm_info['pm_message']), '<div class="messQuote">', '</div>', '<div class="quoteAuthor">', '</div>');
$title = osc_mailBeauty($content['s_title'], $words);
$body = osc_mailBeauty($content['s_text'], $words);
$emailParams = array('subject' => $title, 'to' => $pm_recipData['s_email'], 'to_name' => $pm_name, 'body' => $body, 'alt_body' => $body);
osc_sendMail($emailParams);
}
开发者ID:oanav,项目名称:closetshare,代码行数:45,代码来源:email-temps.php
示例3: __construct
function __construct()
{
// this is necessary because if HTTP_HOST doesn't have the PORT the parse_url is null
$current_host = parse_url(Params::getServerParam('HTTP_HOST'), PHP_URL_HOST);
if ($current_host === null) {
$current_host = Params::getServerParam('HTTP_HOST');
}
if (parse_url(osc_base_url(), PHP_URL_HOST) !== $current_host) {
// first check if it's http or https
$url = 'http://';
if (osc_is_ssl()) {
$url = 'https://';
}
// append the domain
$url .= parse_url(osc_base_url(), PHP_URL_HOST);
// append the port number if it's necessary
$http_port = parse_url(Params::getServerParam('HTTP_HOST'), PHP_URL_PORT);
if ($http_port !== 80) {
$url .= ':' . parse_url(Params::getServerParam('HTTP_HOST'), PHP_URL_PORT);
}
// append the request
$url .= Params::getServerParam('REQUEST_URI', false, false);
$this->redirectTo($url);
}
$this->subdomain_params($current_host);
$this->page = Params::getParam('page');
$this->action = Params::getParam('action');
$this->ajax = false;
$this->time = list($sm, $ss) = explode(' ', microtime());
WebThemes::newInstance();
osc_run_hook('init');
}
开发者ID:oanav,项目名称:closetshare,代码行数:32,代码来源:BaseModel.php
示例4: autocompleteCity
function autocompleteCity()
{
?>
<script type="text/javascript">
$(function() {
function log( message ) {
$( "<div/>" ).text( message ).prependTo( "#log" );
$( "#log" ).attr( "scrollTop", 0 );
}
$( "#sCity" ).autocomplete({
source: "<?php
echo osc_base_url(true);
?>
?page=ajax&action=location",
minLength: 2,
select: function( event, ui ) {
$("#sRegion").attr("value", ui.item.region);
log( ui.item ?
"<?php
echo osc_esc_html(__('Selected', 'bender'));
?>
: " + ui.item.value + " aka " + ui.item.id :
"<?php
echo osc_esc_html(__('Nothing selected, input was', 'bender'));
?>
" + this.value );
}
});
});
</script>
<?php
}
开发者ID:mylastof,项目名称:os-class,代码行数:33,代码来源:search.php
示例5: setCurrentThemeUrl
private function setCurrentThemeUrl()
{
if ($this->theme_exists) {
$this->theme_url = osc_base_url() . 'oc-content/themes/' . $this->theme . '/';
} else {
$this->theme_url = osc_base_url() . 'oc-includes/osclass/gui/';
}
}
开发者ID:hashemgamal,项目名称:OSClass,代码行数:8,代码来源:WebThemes.php
示例6: indeed
function indeed()
{
echo '<?xml version="1.0" encoding="utf-8"?>
<source>
<publisher>' . osc_page_title() . '</publisher>
<publisherurl>' . osc_base_url() . '</publisherurl>
<lastBuildDate>' . date("D, j M Y G:i:s T") . '</lastBuildDate>';
if (osc_count_items()) {
while (osc_has_items()) {
$item = feed_get_job_data(osc_item());
$salary = "";
if (isset($item['i_salary_min']) && $item['i_salary_min'] != '') {
$salary = $item['i_salary_min'];
}
if (isset($item['i_salary_max']) && $item['i_salary_max'] != '') {
if ($salary != "") {
$salary .= ' - ';
}
$salary .= $item['i_salary_max'];
}
if (isset($item['e_salary_period']) && $item['e_slary_period'] != '') {
if ($salary != "") {
$salary .= ' ';
$salary .= $item['e_salary_period'];
}
}
$locale = current($item['locale']);
if (isset($locale['s_desired_exp']) && $locale['s_desired_exp'] != '') {
$experience = $locale['s_desired_exp'];
} else {
$experience = '';
}
if (isset($locale['s_studies']) && $locale['s_studies'] != '') {
$education = $locale['s_studies'];
} else {
$education = '';
}
echo '<job>
<title><![CDATA[' . osc_item_title() . ']]></title>
<date><![CDATA[' . osc_item_pub_date() . ']]></date>
<referencenumber><![CDATA[' . osc_item_id() . ']]></referencenumber>
<url><![CDATA[' . osc_item_url() . ']]></url>
<company><![CDATA[' . (isset($item['s_company_name']) && $item['s_company_name'] != NULL ? $item['s_company_name'] : '') . ']]></company>
<city><![CDATA[' . (osc_item_city() != NULL ? osc_item_city() : '') . ']]></city>
<state><![CDATA[' . (osc_item_region() != NULL ? osc_item_region() : '') . ']]></state>
<country><![CDATA[' . (osc_item_country() != NULL ? osc_item_country() : '') . ']]></country>
<postalcode><![CDATA[' . (osc_item_zip() != NULL ? osc_item_zip() : '') . ']]></postalcode>
<description><![CDATA[' . (osc_item_description() != NULL ? osc_item_description() : '') . ']]></description>
<salary><![CDATA[' . $salary . ']]></salary>
<education><![CDATA[' . $education . ']]></education>
<jobtype><![CDATA[' . (isset($item['e_position_type']) && $item['e_position_type'] != NULL ? $item['e_position_type'] : '') . ']]></jobtype>
<category><![CDATA[]]></category>
<experience><![CDATA[' . $experience . ']]></experience>
</job>';
}
}
echo '</source>';
}
开发者ID:oanav,项目名称:closetshare,代码行数:58,代码来源:indeed.php
示例7: doModel
function doModel()
{
switch ($this->action) {
case 'change_email_confirm':
//change email confirm
if (Params::getParam('userId') && Params::getParam('code')) {
$userManager = new User();
$user = $userManager->findByPrimaryKey(Params::getParam('userId'));
if ($user['s_pass_code'] == Params::getParam('code') && $user['b_enabled'] == 1) {
$userEmailTmp = UserEmailTmp::newInstance()->findByPk(Params::getParam('userId'));
$code = osc_genRandomPassword(50);
$userManager->update(array('s_email' => $userEmailTmp['s_new_email']), array('pk_i_id' => $userEmailTmp['fk_i_user_id']));
Item::newInstance()->update(array('s_contact_email' => $userEmailTmp['s_new_email']), array('fk_i_user_id' => $userEmailTmp['fk_i_user_id']));
ItemComment::newInstance()->update(array('s_author_email' => $userEmailTmp['s_new_email']), array('fk_i_user_id' => $userEmailTmp['fk_i_user_id']));
Alerts::newInstance()->update(array('s_email' => $userEmailTmp['s_new_email']), array('fk_i_user_id' => $userEmailTmp['fk_i_user_id']));
Session::newInstance()->_set('userEmail', $userEmailTmp['s_new_email']);
UserEmailTmp::newInstance()->delete(array('s_new_email' => $userEmailTmp['s_new_email']));
osc_add_flash_ok_message(_m('Your email has been changed successfully'));
$this->redirectTo(osc_user_profile_url());
} else {
osc_add_flash_error_message(_m('Sorry, the link is not valid'));
$this->redirectTo(osc_base_url());
}
} else {
osc_add_flash_error_message(_m('Sorry, the link is not valid'));
$this->redirectTo(osc_base_url());
}
break;
case 'activate_alert':
$email = Params::getParam('email');
$secret = Params::getParam('secret');
$result = 0;
if ($email != '' && $secret != '') {
$result = Alerts::newInstance()->activate($email, $secret);
}
if ($result == 1) {
osc_add_flash_ok_message(_m('Alert activated'));
} else {
osc_add_flash_error_message(_m('Ops! There was a problem trying to activate alert. Please contact the administrator'));
}
$this->redirectTo(osc_base_url(true));
break;
case 'unsub_alert':
$email = Params::getParam('email');
$secret = Params::getParam('secret');
if ($email != '' && $secret != '') {
Alerts::newInstance()->delete(array('s_email' => $email, 'S_secret' => $secret));
osc_add_flash_ok_message(_m('Unsubscribed correctly'));
} else {
osc_add_flash_error_message(_m('Ops! There was a problem trying to unsubscribe you. Please contact the administrator'));
}
$this->redirectTo(osc_base_url());
break;
default:
$this->redirectTo(osc_user_login_url());
break;
}
}
开发者ID:nsswaga,项目名称:OSClass,代码行数:58,代码来源:user-non-secure.php
示例8: qrcode_install
function qrcode_install()
{
@mkdir(osc_content_path() . 'uploads/qrcode/');
$conn = getConnection();
osc_set_preference('upload_path', osc_content_path() . 'uploads/qrcode/', 'qrcode', 'STRING');
osc_set_preference('upload_url', osc_base_url() . 'oc-content/uploads/qrcode/', 'qrcode', 'STRING');
osc_set_preference('code_size', '2', 'qrcode', 'INTEGER');
$conn->commit();
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:9,代码来源:index.php
示例9: osc_search_pagination
/**
* Gets the pagination links of search pagination
*
* @return string pagination links
*/
function osc_search_pagination()
{
$params = array();
if (View::newInstance()->_exists('search_uri')) {
$params['url'] = osc_base_url() . View::newInstance()->_get('search_uri') . '/{PAGE}';
}
$pagination = new Pagination($params);
return $pagination->doPagination();
}
开发者ID:semul,项目名称:Osclass,代码行数:14,代码来源:hPagination.php
示例10: listcloud_ShowCloud
function listcloud_ShowCloud()
{
$text_content = file_get_contents(osc_base_url() . '/oc-content/uploads/listcloud_feeds.cache');
$cloud = new PTagCloud(50);
$cloud->setUTF8(true);
$cloud->addTagsFromText($text_content);
$cloud->setWidth("300px");
echo $cloud->listcloud_Show();
}
开发者ID:fear-otaku,项目名称:oc-listcloud,代码行数:9,代码来源:index.php
示例11: dialogJS
public static function dialogJS()
{
?>
<div id="coinjar-dialog" title="<?php
_e('CoinJar', 'payment');
?>
" style="display: none;"><span id="coinjar-dialog-text"></span></div>
<script type="text/javascript">
function coinjar_pay(amount, description, itemnumber, extra) {
$('#coinjar-dialog-text').html('<?php
_e('You are going to be redirected to our payment processor to continue with the payment. Please wait', 'payment');
?>
');
$('#coinjar-dialog').dialog('open');
$.ajax({
type: "POST",
url: '<?php
echo osc_base_url(true);
?>
',
dataType: 'json',
data: {
'page':'ajax',
'action':'runhook',
'hook':'coinjar',
'amount':amount,
'description':description,
'itemnumber':itemnumber,
'extra':extra
},
success: function(data)
{
console.log(data);
if(data.error==0) {
window.location = data.url;
} else {
$('#coinjar-dialog-text').html('<?php
_e('We are experiencing some errors, please try in a few moments', 'payment');
?>
');
}
}
});
}
$(document).ready(function(){
$("#coinjar-dialog").dialog({
autoOpen: false,
modal: true
});
});
</script>
<?php
}
开发者ID:virsoni,项目名称:plugin-payment,代码行数:56,代码来源:CoinjarPayment.php
示例12: doModel
function doModel()
{
switch ($this->action) {
case 'contact_post':
//contact_post
$yourName = Params::getParam('yourName');
$yourEmail = Params::getParam('yourEmail');
$subject = Params::getParam('subject');
$message = Params::getParam('message');
if (osc_recaptcha_private_key() != '' && Params::existParam("recaptcha_challenge_field")) {
if (!osc_check_recaptcha()) {
osc_add_flash_error_message(_m('The Recaptcha code is wrong'));
Session::newInstance()->_setForm("yourName", $yourName);
Session::newInstance()->_setForm("yourEmail", $yourEmail);
Session::newInstance()->_setForm("subject", $subject);
Session::newInstance()->_setForm("message_body", $message);
$this->redirectTo(osc_contact_url());
return false;
// BREAK THE PROCESS, THE RECAPTCHA IS WRONG
}
}
if (!preg_match('|.*?@.{2,}\\..{2,}|', $yourEmail)) {
osc_add_flash_error_message(_m('You have to introduce a correct e-mail'));
Session::newInstance()->_setForm("yourName", $yourName);
Session::newInstance()->_setForm("subject", $subject);
Session::newInstance()->_setForm("message_body", $message);
$this->redirectTo(osc_contact_url());
}
$params = array('from' => $yourEmail, 'from_name' => $yourName, 'subject' => '[' . osc_page_title() . '] ' . __('Contact form') . ': ' . $subject, 'to' => osc_contact_email(), 'to_name' => __('Administrator'), 'body' => $message, 'alt_body' => $message);
if (osc_contact_attachment()) {
$attachment = Params::getFiles('attachment');
$resourceName = $attachment['name'];
$tmpName = $attachment['tmp_name'];
$resourceType = $attachment['type'];
$path = osc_content_path() . 'uploads/' . time() . '_' . $resourceName;
if (!is_writable(osc_content_path() . 'uploads/')) {
osc_add_flash_error_message(_m('There has been some errors sending the message'));
$this->redirectTo(osc_base_url());
}
if (!move_uploaded_file($tmpName, $path)) {
unset($path);
}
}
if (isset($path)) {
$params['attachment'] = $path;
}
osc_sendMail($params);
osc_add_flash_ok_message(_m('Your e-mail has been sent properly. Thank your for contacting us!'));
$this->redirectTo(osc_base_url());
break;
default:
//contact
$this->doView('contact.php');
}
}
开发者ID:acharei,项目名称:OSClass,代码行数:55,代码来源:contact.php
示例13: setGuiTheme
public function setGuiTheme()
{
$this->theme = '';
$this->theme_exists = false;
$this->theme_path = osc_lib_path() . 'osclass/gui/';
$this->theme_url = osc_base_url() . 'oc-includes/osclass/gui/';
$functions_path = $this->getCurrentThemePath() . 'functions.php';
if (file_exists($functions_path)) {
require_once $functions_path;
}
}
开发者ID:jmcclenon,项目名称:Osclass,代码行数:11,代码来源:WebThemes.php
示例14: button
public static function button($amount = '0.00', $description = '', $itemnumber = '101', $extra_array = null)
{
$extra = payment_prepare_custom($extra_array);
$r = rand(0, 1000);
$extra .= 'random,' . $r;
$apcs = self::customToAPC($extra);
$RETURNURL = osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'return.php?extra=' . $extra;
$CANCELURL = osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'cancel.php?extra=' . $extra;
?>
<form method="post" action="https://secure.payza.com/checkout" >
<input type="hidden" name="ap_merchant" value="[email protected]"/>
<input type="hidden" name="ap_purchasetype" value="service"/>
<input type="hidden" name="ap_itemname" value="<?php
echo $description;
?>
"/>
<input type="hidden" name="ap_amount" value="<?php
echo $amount;
?>
"/>
<input type="hidden" name="ap_currency" value="<?php
echo osc_get_preference('currency', 'payment');
?>
"/>
<input type="hidden" name="ap_quantity" value="1"/>
<input type="hidden" name="ap_itemcode" value="<?php
echo $itemnumber;
?>
"/>
<input type="hidden" name="ap_description" value="Audio equipment"/>
<input type="hidden" name="ap_returnurl" value="<?php
echo $RETURNURL;
?>
"/>
<input type="hidden" name="ap_cancelurl" value="<?php
echo $CANCELURL;
?>
"/>
<?php
foreach ($apcs as $k => $v) {
echo '<input type="hidden" name="apc_' . $k . '" value="' . $v . '"/>';
}
?>
<input type="image" src="<?php
echo osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__);
?>
payza-buy-now.png"/>
</form>
<?php
}
开发者ID:virsoni,项目名称:plugin-payment,代码行数:53,代码来源:Payza.php
示例15: showAuthFailPage
function showAuthFailPage()
{
if (Params::getParam('page') == 'ajax') {
echo json_encode(array('error' => 1, 'msg' => __('Session timed out')));
exit;
} else {
//Session::newInstance()->session_start();
Session::newInstance()->_setReferer(osc_base_url() . preg_replace('|^' . REL_WEB_URL . '|', '', Params::getServerParam('REQUEST_URI', false, false)));
header("Location: " . osc_admin_base_url(true) . "?page=login");
exit;
}
}
开发者ID:mylastof,项目名称:os-class,代码行数:12,代码来源:AdminSecBaseModel.php
示例16: button
/**
* Create and print a "Pay with Paypal" button
*
* @param float $amount
* @param string $description
* @param string $itemnumber (publish fee, premium, pack and which category)
* @param string $extra custom variables
*/
public static function button($amount = '0.00', $description = '', $itemnumber = '101', $extra_array = null)
{
if (osc_get_preference('currency', 'payment') != 'BTC') {
$amount = osc_file_get_contents("https://blockchain.info/tobtc?currency=" . osc_get_preference('currency', 'payment') . "&value=" . $amount);
}
$extra = payment_prepare_custom($extra_array);
$extra .= 'concept,' . $description . '|';
$extra .= 'product,' . $itemnumber . '|';
$r = rand(0, 1000);
$extra .= 'random,' . $r;
$CALLBACK_URL = osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'callback.php?extra=' . $extra;
?>
<li class="payment bitcoin-btn">
<div class="blockchain-btn"
data-address="<?php
echo osc_get_preference('blockchain_btc_address', 'payment');
?>
"
data-anonymous="false"
data-callback="<?php
echo $CALLBACK_URL;
?>
">
<div class="blockchain stage-begin">
<img src="<?php
echo osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__);
?>
pay_now_64.png">
</div>
<div class="blockchain stage-loading" style="text-align:center">
<img src="<?php
echo osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__);
?>
loading-large.gif">
</div>
<div class="blockchain stage-ready">
<p align="center"><?php
printf(__('Please send %f BTC to <br /> <b>[[address]]</b></p>', 'payment'), $amount);
?>
<p align="center" class="qr-code"></p>
</div>
<div class="blockchain stage-paid">
<?php
_e('Payment Received <b>[[value]] BTC</b>. Thank You.', 'payment');
?>
</div>
<div class="blockchain stage-error">
<span color="red">[[error]]</span>
</div>
</div>
</li>
<?php
}
开发者ID:virsoni,项目名称:plugin-payment,代码行数:61,代码来源:Blockchain.php
示例17: osc_search_pagination
/**
* Gets the pagination links of search pagination
*
* @return string pagination links
*/
function osc_search_pagination()
{
$params = array();
if (View::newInstance()->_exists('search_uri')) {
// CANONICAL URL
$params['url'] = osc_base_url() . View::newInstance()->_get('search_uri') . '/{PAGE}';
$params['first_url'] = osc_base_url() . View::newInstance()->_get('search_uri');
} else {
$params['first_url'] = osc_update_search_url(array('iPage' => null));
}
$pagination = new Pagination($params);
return $pagination->doPagination();
}
开发者ID:mylastof,项目名称:os-class,代码行数:18,代码来源:hPagination.php
示例18: doModel
function doModel()
{
switch ($this->action) {
case 'spamNbots':
// calling the spam and bots view
$akismet_key = osc_akismet_key();
$akismet_status = 3;
if ($akismet_key != '') {
require_once osc_lib_path() . 'Akismet.class.php';
$akismet_obj = new Akismet(osc_base_url(), $akismet_key);
$akismet_status = 2;
if ($akismet_obj->isKeyValid()) {
$akismet_status = 1;
}
}
View::newInstance()->_exportVariableToView('akismet_status', $akismet_status);
$this->doView('settings/spamNbots.php');
break;
case 'akismet_post':
// updating spam and bots option
osc_csrf_check();
$updated = 0;
$akismetKey = Params::getParam('akismetKey');
$akismetKey = trim($akismetKey);
$updated = osc_set_preference('akismetKey', $akismetKey);
if ($akismetKey == '') {
osc_add_flash_info_message(_m('Your Akismet key has been cleared'), 'admin');
} else {
osc_add_flash_ok_message(_m('Your Akismet key has been updated'), 'admin');
}
$this->redirectTo(osc_admin_base_url(true) . '?page=settings&action=spamNbots');
break;
case 'recaptcha_post':
// updating spam and bots option
osc_csrf_check();
$iUpdated = 0;
$recaptchaPrivKey = Params::getParam('recaptchaPrivKey');
$recaptchaPrivKey = trim($recaptchaPrivKey);
$recaptchaPubKey = Params::getParam('recaptchaPubKey');
$recaptchaPubKey = trim($recaptchaPubKey);
$iUpdated += osc_set_preference('recaptchaPrivKey', $recaptchaPrivKey);
$iUpdated += osc_set_preference('recaptchaPubKey', $recaptchaPubKey);
if ($recaptchaPubKey == '') {
osc_add_flash_info_message(_m('Your reCAPTCHA key has been cleared'), 'admin');
} else {
osc_add_flash_ok_message(_m('Your reCAPTCHA key has been updated'), 'admin');
}
$this->redirectTo(osc_admin_base_url(true) . '?page=settings&action=spamNbots');
break;
}
}
开发者ID:oanav,项目名称:closetshare,代码行数:51,代码来源:spamnbots.php
示例19: doModel
function doModel()
{
$locale = Params::getParam('locale');
if (preg_match('/.{2}_.{2}/', $locale)) {
Session::newinstance()->_set('userLocale', $locale);
}
$redirect_url = '';
if ($_SERVER['HTTP_REFERER'] != '') {
$redirect_url = $_SERVER['HTTP_REFERER'];
} else {
$redirect_url = osc_base_url(true);
}
$this->redirectTo($redirect_url);
}
开发者ID:naneri,项目名称:Osclass,代码行数:14,代码来源:language.php
示例20: doModel
function doModel()
{
$id = Params::getParam('id');
$page = false;
if (is_numeric($id)) {
$page = $this->pageManager->findByPrimaryKey($id);
} else {
$page = $this->pageManager->findByInternalName(Params::getParam('slug'));
}
// page not found
if ($page == false) {
$this->do404();
return;
}
// this page shouldn't be shown (i.e.: e-mail templates)
if ($page['b_indelible'] == 1) {
$this->do404();
return;
}
$kwords = array('{WEB_URL}', '{WEB_TITLE}');
$rwords = array(osc_base_url(), osc_page_title());
foreach ($page['locale'] as $k => $v) {
$page['locale'][$k]['s_title'] = str_ireplace($kwords, $rwords, osc_apply_filter('email_description', $v['s_title']));
$page['locale'][$k]['s_text'] = str_ireplace($kwords, $rwords, osc_apply_filter('email_description', $v['s_text']));
}
// export $page content to View
$this->_exportVariableToView('page', $page);
if (Params::getParam('lang') != '') {
Session::newInstance()->_set('userLocale', Params::getParam('lang'));
}
$meta = json_decode($page['s_meta'], true);
// load the right template file
if (file_exists(osc_themes_path() . osc_theme() . '/page-' . $page['s_internal_name'] . '.php')) {
$this->doView('page-' . $page['s_internal_name'] . '.php');
} else {
if (isset($meta['template']) && file_exists(osc_themes_path() . osc_theme() . '/' . $meta['template'])) {
$this->doView($meta['template']);
} else {
if (isset($meta['template']) && file_exists(osc_plugins_path() . '/' . $meta['template'])) {
osc_run_hook('before_html');
require osc_plugins_path() . '/' . $meta['template'];
Session::newInstance()->_clearVariables();
osc_run_hook('after_html');
} else {
$this->doView('page.php');
}
}
}
}
开发者ID:jmcclenon,项目名称:Osclass,代码行数:49,代码来源:page.php
注:本文中的osc_base_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论