本文整理汇总了PHP中osc_admin_base_url函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_admin_base_url函数的具体用法?PHP osc_admin_base_url怎么用?PHP osc_admin_base_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_admin_base_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: admin_footer_html
function admin_footer_html() { ?>
<div class="float-left">
<?php printf(__('Thank you for using <a href="%s" target="_blank">Osclass</a>'), 'http://osclass.org/'); ?> -
<a title="<?php _e('Documentation'); ?>" href="http://doc.osclass.org/" target="_blank"><?php _e('Documentation'); ?></a> ·
<a title="<?php _e('Forums'); ?>" href="http://forums.osclass.org/" target="_blank"><?php _e('Forums'); ?></a> ·
<a title="<?php _e('Feedback'); ?>" href="https://osclass.uservoice.com/" target="_blank"><?php _e('Feedback'); ?></a>
</div>
<div class="float-right">
<strong>Osclass <?php echo preg_replace('|.0$|', '', OSCLASS_VERSION); ?></strong>
</div>
<a id="ninja" href="" class="ico ico-48 ico-dash-white"></a>
<div class="clear"></div>
<form id="donate-form" name="_xclick" action="https://www.paypal.com/in/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Osclass project">
<input type="hidden" name="return" value="<?php echo osc_admin_base_url(); ?>">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US" />
</form>
<!-- javascript
================================================== -->
<script type="text/javascript">
var $ninja = $('#ninja');
$ninja.click(function(){
jQuery('#donate-form').submit();
return false;
});
</script><?php
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:31,代码来源:functions.php
示例2: customHead
function customHead()
{
?>
<script type="text/javascript">
$(document).ready(function(){
if (typeof $.uniform != 'undefined') {
$('textarea, button,select, input:file').uniform();
}
<?php
if (Params::getParam('confirm') == 'true') {
?>
$('#output').show();
$('#tohide').hide();
$.get('<?php
echo osc_admin_base_url(true);
?>
?page=upgrade&action=upgrade-funcs' , function(data) {
$('#loading_immage').hide();
$('#result').append(data+"<br/>");
});
<?php
}
?>
});
</script>
<?php
}
开发者ID:semul,项目名称:Osclass,代码行数:29,代码来源:index.php
示例3: doModel
function doModel()
{
parent::doModel();
//specific things for this class
switch ($this->action) {
case 'add_post_default':
// add default category and reorder parent categories
$fields['fk_i_parent_id'] = NULL;
$fields['i_expiration_days'] = 0;
$fields['i_position'] = 0;
$fields['b_enabled'] = 1;
$default_locale = osc_language();
$aFieldsDescription[$default_locale]['s_name'] = "NEW CATEGORY, EDIT ME!";
$categoryId = $this->categoryManager->insert($fields, $aFieldsDescription);
// reorder parent categories. NEW category first
$rootCategories = $this->categoryManager->findRootCategories();
foreach ($rootCategories as $cat) {
$order = $cat['i_position'];
$order++;
$this->categoryManager->updateOrder($cat['pk_i_id'], $order);
}
$this->categoryManager->updateOrder($categoryId, '0');
$this->redirectTo(osc_admin_base_url(true) . '?page=categories');
break;
default:
//
$this->_exportVariableToView("categories", $this->categoryManager->toTreeAll());
$this->doView("categories/index.php");
}
}
开发者ID:michaelxizhou,项目名称:myeden69,代码行数:30,代码来源:functions.php
示例4: mdh_emailmagick_bump_me
/**
* Makes this plugin the first to be loaded.
* - Bumps this plugin at the top of the active_plugins stack.
*/
function mdh_emailmagick_bump_me()
{
if (OC_ADMIN) {
// @legacy : ALWAYS remove this if active.
if (osc_plugin_is_enabled("madhouse_utils/index.php")) {
Plugins::deactivate("madhouse_utils/index.php");
}
// Sanitize & get the {PLUGIN_NAME}/index.php.
$path = str_replace(osc_plugins_path(), '', osc_plugin_path(__FILE__));
if (osc_plugin_is_installed($path)) {
// Get the active plugins.
$plugins_list = unserialize(osc_active_plugins());
if (!is_array($plugins_list)) {
return false;
}
// Remove $path from the active plugins list
foreach ($plugins_list as $k => $v) {
if ($v == $path) {
unset($plugins_list[$k]);
}
}
// Re-add the $path at the beginning of the active plugins.
array_unshift($plugins_list, $path);
// Serialize the new active_plugins list.
osc_set_preference('active_plugins', serialize($plugins_list));
if (Params::getParam("page") === "plugins" && Params::getParam("action") === "enable" && Params::getParam("plugin") === $path) {
//osc_redirect_to(osc_admin_base_url(true) . "?page=plugins");
} else {
osc_redirect_to(osc_admin_base_url(true) . "?" . http_build_query(Params::getParamsAsArray("get")));
}
}
}
}
开发者ID:bomvendador,项目名称:soroka_r,代码行数:37,代码来源:index.php
示例5: doModel
function doModel()
{
switch ($this->action) {
case 'latestsearches':
//calling the comments settings view
$this->doView('settings/searches.php');
break;
case 'latestsearches_post':
// updating comment
osc_csrf_check();
if (Params::getParam('save_latest_searches') == 'on') {
osc_set_preference('save_latest_searches', 1);
} else {
osc_set_preference('save_latest_searches', 0);
}
if (Params::getParam('customPurge') == '') {
osc_add_flash_error_message(_m('Custom number could not be left empty'), 'admin');
$this->redirectTo(osc_admin_base_url(true) . '?page=settings&action=latestsearches');
} else {
osc_set_preference('purge_latest_searches', Params::getParam('customPurge'));
osc_add_flash_ok_message(_m('Last search settings have been updated'), 'admin');
$this->redirectTo(osc_admin_base_url(true) . '?page=settings&action=latestsearches');
}
break;
}
}
开发者ID:mylastof,项目名称:os-class,代码行数:26,代码来源:latestsearches.php
示例6: 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
示例7: doModel
function doModel()
{
parent::doModel();
//specific things for this class
switch ($this->action) {
case 'delete':
$ids = Params::getParam("id");
if ($ids != '') {
foreach ($ids as $id) {
osc_deleteResource($id);
}
$this->resourcesManager->delete(array(DB_CUSTOM_COND => 'pk_i_id IN (' . implode(', ', $ids) . ')'));
}
osc_add_flash_message(_m('Resource deleted'), 'admin');
$this->redirectTo(osc_admin_base_url(true) . "?page=media");
break;
default:
$resourceId = Params::getParam("id");
if ($resourceId != '') {
$resources = $this->resourcesManager->getAllResources($resourceId);
} else {
$resources = $this->resourcesManager->getAllResources(NULL);
}
//calling the view...
$this->_exportVariableToView("resources", $resources);
$this->_exportVariableToView("resourceId", $resourceId);
$this->doView('media/index.php');
}
}
开发者ID:hashemgamal,项目名称:OSClass,代码行数:29,代码来源:media.php
示例8: processData
private function processData($pages)
{
if (!empty($pages)) {
$prefLocale = osc_current_user_locale();
foreach ($pages as $aRow) {
$row = array();
$content = array();
if (isset($aRow['locale'][$prefLocale]) && !empty($aRow['locale'][$prefLocale]['s_title'])) {
$content = $aRow['locale'][$prefLocale];
} else {
$content = current($aRow['locale']);
}
// -- options --
$options = array();
View::newInstance()->_exportVariableToView('page', $aRow);
$options[] = '<a href="' . osc_static_page_url() . '" target="_blank">' . __('View page') . '</a>';
$options[] = '<a href="' . osc_admin_base_url(true) . '?page=pages&action=edit&id=' . $aRow['pk_i_id'] . '">' . __('Edit') . '</a>';
if (!$aRow['b_indelible']) {
$options[] = '<a onclick="return delete_dialog(\'' . $aRow['pk_i_id'] . '\');" href="' . osc_admin_base_url(true) . '?page=pages&action=delete&id=' . $aRow['pk_i_id'] . '&' . osc_csrf_token_url() . '">' . __('Delete') . '</a>';
}
$auxOptions = '<ul>' . PHP_EOL;
foreach ($options as $actual) {
$auxOptions .= '<li>' . $actual . '</li>' . PHP_EOL;
}
$actions = '<div class="actions">' . $auxOptions . '</div>' . PHP_EOL;
$row['bulkactions'] = '<input type="checkbox" name="id[]"" value="' . $aRow['pk_i_id'] . '"" />';
$row['internal_name'] = $aRow['s_internal_name'] . $actions;
$row['title'] = $content['s_title'];
$row['order'] = '<div class="order-box">' . $aRow['i_order'] . ' <img class="up" onclick="order_up(' . $aRow['pk_i_id'] . ');" src="' . osc_current_admin_theme_url('images/arrow_up.png') . '" alt="' . __('Up') . '" title="' . __('Up') . '" /> <img class="down" onclick="order_down(' . $aRow['pk_i_id'] . ');" src="' . osc_current_admin_theme_url('images/arrow_down.png') . '" alt="' . __('Down') . '" title="' . __('Down') . '" /></div>';
$row = osc_apply_filter('pages_processing_row', $row, $aRow);
$this->addRow($row);
$this->rawRows[] = $aRow;
}
}
}
开发者ID:mylastof,项目名称:os-class,代码行数:35,代码来源:PagesDataTable.php
示例9: doModel
function doModel()
{
switch ($this->action) {
case 'logout':
// unset only the required parameters in Session
Session::newInstance()->_drop('adminId');
Session::newInstance()->_drop('adminUserName');
Session::newInstance()->_drop('adminName');
Session::newInstance()->_drop('adminEmail');
Session::newInstance()->_drop('adminLocale');
Cookie::newInstance()->pop('oc_adminId');
Cookie::newInstance()->pop('oc_adminSecret');
Cookie::newInstance()->pop('oc_adminLocale');
Cookie::newInstance()->set();
$this->redirectTo(osc_admin_base_url(true));
break;
default:
//default dashboard page (main page at oc-admin)
$this->_exportVariableToView("numUsers", User::newInstance()->count());
$this->_exportVariableToView("numAdmins", Admin::newInstance()->count());
$this->_exportVariableToView("numItems", Item::newInstance()->count());
$this->_exportVariableToView("numItemsSpam", Item::newInstance()->totalItems(null, 'SPAM'));
$this->_exportVariableToView("numItemsBlock", Item::newInstance()->totalItems(null, 'DISABLED'));
$this->_exportVariableToView("numItemsInactive", Item::newInstance()->totalItems(null, 'INACTIVE'));
$this->_exportVariableToView("numItemsPerCategory", osc_get_non_empty_categories());
$this->_exportVariableToView("newsList", osc_listNews());
$this->_exportVariableToView("comments", ItemComment::newInstance()->getLastComments(5));
//calling the view...
$this->doView('main/index.php');
}
}
开发者ID:randomecho,项目名称:OSClass,代码行数:31,代码来源:main.php
示例10: __construct
function __construct()
{
parent::__construct();
osc_run_hook('init_admin');
// check if exist a new version each day
if (time() - osc_last_version_check() > 24 * 3600) {
$data = osc_file_get_contents('http://osclass.org/latest_version.php?callback=?');
$data = preg_replace('|^\\?\\((.*?)\\);$|', '$01', $data);
$json = json_decode($data);
if ($json->version > osc_version()) {
osc_set_preference('update_core_json', $data);
} else {
osc_set_preference('update_core_json', '');
}
osc_set_preference('last_version_check', time());
osc_reset_preferences();
}
$config_version = str_replace('.', '', OSCLASS_VERSION);
$config_version = preg_replace('|-.*|', '', $config_version);
if ($config_version > Preference::newInstance()->get('version')) {
if (get_class($this) == 'CAdminTools') {
} else {
if (get_class($this) != 'CAdminUpgrade') {
$this->redirectTo(osc_admin_base_url(true) . '?page=upgrade');
}
}
}
}
开发者ID:randomecho,项目名称:OSClass,代码行数:28,代码来源:AdminSecBaseModel.php
示例11: doModel
function doModel()
{
parent::doModel();
//specific things for this class
switch ($this->action) {
case 'add_post':
if (Params::getParam('field_name') != '') {
$field = $this->fieldManager->findByName(Params::getParam('field_name'));
if (!isset($field['pk_i_id'])) {
$slug = preg_replace('|([-]+)|', '-', preg_replace('|[^a-z0-9_-]|', '-', strtolower(Params::getParam("field_slug"))));
$this->fieldManager->insertField(Params::getParam("field_name"), Params::getParam("field_type_new"), $slug, Params::getParam("field_required") == "1" ? 1 : 0, Params::getParam('field_options'), Params::getParam('categories'));
osc_add_flash_ok_message(_m("New custom field added"), "admin");
} else {
osc_add_flash_error_message(_m("Sorry, you already have one field with that name"), "admin");
}
} else {
osc_add_flash_error_message(_m("Name can not be empty"), "admin");
}
$this->redirectTo(osc_admin_base_url(true) . "?page=cfields");
break;
default:
$categories = Category::newInstance()->toTreeAll();
$selected = array();
foreach ($categories as $c) {
$selected[] = $c['pk_i_id'];
foreach ($c['categories'] as $cc) {
$selected[] = $cc['pk_i_id'];
}
}
$this->_exportVariableToView("categories", $categories);
$this->_exportVariableToView("default_selected", $selected);
$this->_exportVariableToView("fields", $this->fieldManager->listAll());
$this->doView("fields/index.php");
}
}
开发者ID:acharei,项目名称:OSClass,代码行数:35,代码来源:custom_fields.php
示例12: doModel
function doModel()
{
switch ($this->action) {
case 'advanced':
//calling the advanced settings view
$this->doView('settings/advanced.php');
break;
case 'advanced_post':
// updating advanced settings
if (defined('DEMO')) {
osc_add_flash_warning_message(_m("This action can't be done because it's a demo site"), 'admin');
$this->redirectTo(osc_admin_base_url(true) . '?page=settings&action=advanced');
}
osc_csrf_check();
$subdomain_type = Params::getParam('e_type');
if (!in_array($subdomain_type, array('category', 'country', 'region', 'city', 'user'))) {
$subdomain_type = '';
}
$iUpdated = osc_set_preference('subdomain_type', $subdomain_type);
$iUpdated += osc_set_preference('subdomain_host', Params::getParam('s_host'));
if ($iUpdated > 0) {
osc_add_flash_ok_message(_m("Advanced settings have been updated"), 'admin');
}
osc_calculate_location_slug(osc_subdomain_type());
$this->redirectTo(osc_admin_base_url(true) . '?page=settings&action=advanced');
break;
case 'advanced_cache_flush':
osc_cache_flush();
osc_add_flash_ok_message(_m("Cache flushed correctly"), 'admin');
$this->redirectTo(osc_admin_base_url(true) . '?page=settings&action=advanced');
break;
}
}
开发者ID:oanav,项目名称:closetshare,代码行数:33,代码来源:advanced.php
示例13: setCurrentThemeUrl
private function setCurrentThemeUrl()
{
if ($this->theme_exists) {
$this->theme_url = osc_admin_base_url() . 'themes/' . $this->theme . '/';
} else {
$this->theme_url = osc_admin_base_url() . 'gui/';
}
}
开发者ID:hashemgamal,项目名称:OSClass,代码行数:8,代码来源:AdminThemes.php
示例14: customHead
function customHead()
{
$all = osc_get_preference('location_todo');
if ($all == '') {
$all = 0;
}
$worktodo = LocationsTmp::newInstance()->count();
?>
<script type="text/javascript">
function reload() {
window.location = '<?php
echo osc_admin_base_url(true) . '?page=tools&action=locations';
?>
';
}
function ajax_() {
$.ajax({
type: "POST",
url: '<?php
echo osc_admin_base_url(true);
?>
?page=ajax&action=location_stats&<?php
echo osc_csrf_token_url();
?>
',
dataType: 'json',
success: function(data) {
if(data.status=='done') {
$('span#percent').html(100);
}else{
var pending = data.pending;
var all = <?php
echo osc_esc_js($all);
?>
;
var percent = parseInt( ((all-pending)*100) / all );
$('span#percent').html(percent);
ajax_();
}
}
});
}
$(document).ready(function(){
if(<?php
echo $worktodo;
?>
> 0) {
ajax_();
}
});
</script>
<?php
}
开发者ID:mylastof,项目名称:os-class,代码行数:55,代码来源:locations.php
示例15: processData
private function processData($comments)
{
if (!empty($comments)) {
$csrf_token_url = osc_csrf_token_url();
foreach ($comments as $aRow) {
$row = array();
$options = array();
$options_more = array();
View::newInstance()->_exportVariableToView('item', Item::newInstance()->findByPrimaryKey($aRow['fk_i_item_id']));
if ($aRow['b_enabled']) {
$options_more[] = '<a href="' . osc_admin_base_url(true) . '?page=comments&action=status&id=' . $aRow['pk_i_id'] . '&' . $csrf_token_url . '&value=DISABLE">' . __('Block') . '</a>';
} else {
$options_more[] = '<a href="' . osc_admin_base_url(true) . '?page=comments&action=status&id=' . $aRow['pk_i_id'] . '&' . $csrf_token_url . '&value=ENABLE">' . __('Unblock') . '</a>';
}
$options_more[] = '<a onclick="return delete_dialog(\'' . $aRow['pk_i_id'] . '\');" href="' . osc_admin_base_url(true) . '?page=comments&action=delete&id=' . $aRow['pk_i_id'] . '" id="dt_link_delete">' . __('Delete') . '</a>';
$options[] = '<a href="' . osc_admin_base_url(true) . '?page=comments&action=comment_edit&id=' . $aRow['pk_i_id'] . '" id="dt_link_edit">' . __('Edit') . '</a>';
if ($aRow['b_active']) {
$options[] = '<a href="' . osc_admin_base_url(true) . '?page=comments&action=status&id=' . $aRow['pk_i_id'] . '&' . $csrf_token_url . '&value=INACTIVE">' . __('Deactivate') . '</a>';
} else {
$options[] = '<a href="' . osc_admin_base_url(true) . '?page=comments&action=status&id=' . $aRow['pk_i_id'] . '&' . $csrf_token_url . '&value=ACTIVE">' . __('Activate') . '</a>';
}
// more actions
$moreOptions = '<li class="show-more">' . PHP_EOL . '<a href="#" class="show-more-trigger">' . __('Show more') . '...</a>' . PHP_EOL . '<ul>' . PHP_EOL;
foreach ($options_more as $actual) {
$moreOptions .= '<li>' . $actual . "</li>" . PHP_EOL;
}
$moreOptions .= '</ul>' . PHP_EOL . '</li>' . PHP_EOL;
// create list of actions
$auxOptions = '<ul>' . PHP_EOL;
foreach ($options as $actual) {
$auxOptions .= '<li>' . $actual . '</li>' . PHP_EOL;
}
$auxOptions .= $moreOptions;
$auxOptions .= '</ul>' . PHP_EOL;
$actions = '<div class="actions">' . $auxOptions . '</div>' . PHP_EOL;
$status = $this->get_row_status($aRow);
$row['status-border'] = '';
$row['status'] = $status['text'];
$row['bulkactions'] = '<input type="checkbox" name="id[]" value="' . $aRow['pk_i_id'] . '" />';
if (empty($aRow['s_author_name'])) {
$user = User::newInstance()->findByPrimaryKey($aRow['fk_i_user_id']);
$aRow['s_author_name'] = $user['s_email'];
}
$row['author'] = $aRow['s_author_name'] . ' (<a target="_blank" href="' . osc_item_url() . '">' . osc_item_title() . '</a>)' . $actions;
$row['comment'] = $aRow['s_body'];
$row['date'] = osc_format_date($aRow['dt_pub_date']);
$row = osc_apply_filter('comments_processing_row', $row, $aRow);
$this->addRow($row);
$this->rawRows[] = $aRow;
}
}
}
开发者ID:oanav,项目名称:closetshare,代码行数:52,代码来源:CommentsDataTable.php
示例16: processData
private function processData($alerts)
{
if (!empty($alerts) && !empty($alerts['alerts'])) {
$csrf_token_url = osc_csrf_token_url();
foreach ($alerts['alerts'] as $aRow) {
$row = array();
$options = array();
// first column
$row['bulkactions'] = '<input type="checkbox" name="alert_id[]" value="' . $aRow['pk_i_id'] . '" /></div>';
$options[] = '<a onclick="return delete_alert(\'' . $aRow['pk_i_id'] . '\');" href="#">' . __('Delete') . '</a>';
if ($aRow['b_active'] == 1) {
$options[] = '<a href="' . osc_admin_base_url(true) . '?page=users&action=status_alerts&alert_id[]=' . $aRow['pk_i_id'] . '&' . $csrf_token_url . '&status=0" >' . __('Deactivate') . '</a>';
} else {
$options[] = '<a href="' . osc_admin_base_url(true) . '?page=users&action=status_alerts&alert_id[]=' . $aRow['pk_i_id'] . '&' . $csrf_token_url . '&status=1" >' . __('Activate') . '</a>';
}
$options = osc_apply_filter('actions_manage_alerts', $options, $aRow);
// create list of actions
$auxOptions = '<ul>' . PHP_EOL;
foreach ($options as $actual) {
$auxOptions .= '<li>' . $actual . '</li>' . PHP_EOL;
}
$auxOptions .= '</ul>' . PHP_EOL;
$actions = '<div class="actions">' . $auxOptions . '</div>' . PHP_EOL;
// second column
$row['email'] = '<a href="' . osc_admin_base_url(true) . '?page=items&userId=">' . $aRow['s_email'] . '</a>' . $actions;
// third row
$pieces = array();
$conditions = osc_get_raw_search((array) json_decode($aRow['s_search'], true));
if (isset($conditions['sPattern']) && $conditions['sPattern'] != '') {
$pieces[] = sprintf(__("<b>Pattern:</b> %s"), $conditions['sPattern']);
}
if (isset($conditions['aCategories']) && !empty($conditions['aCategories'])) {
$l = min(count($conditions['aCategories']), 4);
$cat_array = array();
for ($c = 0; $c < $l; $c++) {
$cat_array[] = $conditions['aCategories'][$c];
}
if (count($conditions['aCategories']) > $l) {
$cat_array[] = '<a href="#" class="more-tooltip" categories="' . osc_esc_html(implode(", ", $conditions['aCategories'])) . '" >' . __("...More") . '</a>';
}
$pieces[] = sprintf(__("<b>Categories:</b> %s"), implode(", ", $cat_array));
}
$row['alert'] = implode($pieces, ", ");
// fourth row
$row['date'] = osc_format_date($aRow['dt_date']);
$row = osc_apply_filter('alerts_processing_row', $row, $aRow);
$this->addRow($row);
$this->rawRows[] = $aRow;
}
}
}
开发者ID:mylastof,项目名称:os-class,代码行数:51,代码来源:AlertsDataTable.php
示例17: 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
示例18: doModel
function doModel()
{
switch ($this->action) {
case 'comments':
//calling the comments settings view
$this->doView('settings/comments.php');
break;
case 'comments_post':
// updating comment
osc_csrf_check();
$iUpdated = 0;
$enabledComments = Params::getParam('enabled_comments');
$enabledComments = $enabledComments != '' ? true : false;
$moderateComments = Params::getParam('moderate_comments');
$moderateComments = $moderateComments != '' ? true : false;
$numModerateComments = Params::getParam('num_moderate_comments');
$commentsPerPage = Params::getParam('comments_per_page');
$notifyNewComment = Params::getParam('notify_new_comment');
$notifyNewComment = $notifyNewComment != '' ? true : false;
$notifyNewCommentUser = Params::getParam('notify_new_comment_user');
$notifyNewCommentUser = $notifyNewCommentUser != '' ? true : false;
$regUserPostComments = Params::getParam('reg_user_post_comments');
$regUserPostComments = $regUserPostComments != '' ? true : false;
$msg = '';
if (!osc_validate_int(Params::getParam("num_moderate_comments"))) {
$msg .= _m("Number of moderate comments must only contain numeric characters") . "<br/>";
}
if (!osc_validate_int(Params::getParam("comments_per_page"))) {
$msg .= _m("Comments per page must only contain numeric characters") . "<br/>";
}
if ($msg != '') {
osc_add_flash_error_message($msg, 'admin');
$this->redirectTo(osc_admin_base_url(true) . '?page=settings&action=comments');
}
$iUpdated += osc_set_preference('enabled_comments', $enabledComments);
if ($moderateComments) {
$iUpdated += osc_set_preference('moderate_comments', $numModerateComments);
} else {
$iUpdated += osc_set_preference('moderate_comments', '-1');
}
$iUpdated += osc_set_preference('notify_new_comment', $notifyNewComment);
$iUpdated += osc_set_preference('notify_new_comment_user', $notifyNewCommentUser);
$iUpdated += osc_set_preference('comments_per_page', $commentsPerPage);
$iUpdated += osc_set_preference('reg_user_post_comments', $regUserPostComments);
if ($iUpdated > 0) {
osc_add_flash_ok_message(_m("Comment settings have been updated"), 'admin');
}
$this->redirectTo(osc_admin_base_url(true) . '?page=settings&action=comments');
break;
}
}
开发者ID:oanav,项目名称:closetshare,代码行数:51,代码来源:comments.php
示例19: customPageHeader
function customPageHeader()
{
?>
<h1><?php
_e('Manage Media');
?>
<a href="<?php
echo osc_admin_base_url(true) . '?page=settings&action=media';
?>
" class="btn ico ico-32 ico-engine float-right"></a>
<a href="#" class="btn ico ico-32 ico-help float-right"></a>
</h1>
<?php
}
开发者ID:semul,项目名称:Osclass,代码行数:14,代码来源:index.php
示例20: doModel
function doModel()
{
parent::doModel();
//specific things for this class
switch ($this->action) {
case 'edit':
if (Params::getParam("id") == '') {
$this->redirectTo(osc_admin_base_url(true) . "?page=emails");
}
$this->_exportVariableToView("email", $this->emailManager->findByPrimaryKey(Params::getParam("id")));
$this->doView("emails/frm.php");
break;
case 'edit_post':
$id = Params::getParam("id");
$s_internal_name = Params::getParam("s_internal_name");
$aFieldsDescription = array();
$postParams = Params::getParamsAsArray('', false);
$not_empty = false;
foreach ($postParams as $k => $v) {
if (preg_match('|(.+?)#(.+)|', $k, $m)) {
if ($m[2] == 's_title' && $v != '') {
$not_empty = true;
}
$aFieldsDescription[$m[1]][$m[2]] = $v;
}
}
if ($not_empty) {
foreach ($aFieldsDescription as $k => $_data) {
$this->emailManager->updateDescription($id, $k, $_data['s_title'], $_data['s_text']);
}
if (!$this->emailManager->internalNameExists($id, $s_internal_name)) {
if (!$this->emailManager->isIndelible($id)) {
$this->emailManager->updateInternalName($id, $s_internal_name);
}
|
请发表评论