本文整理汇总了PHP中fn_get_discussion函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_get_discussion函数的具体用法?PHP fn_get_discussion怎么用?PHP fn_get_discussion使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_get_discussion函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: fn_exim_products_discussion_export
function fn_exim_products_discussion_export($product_id)
{
$data = fn_get_discussion($product_id, 'P');
if (!empty($data['type'])) {
$return = $data['type'];
} else {
$return = false;
}
return $return;
}
开发者ID:askzap,项目名称:ultimate,代码行数:10,代码来源:products.functions.php
示例2: fn_get_discussion_object_data
}
}
}
$show_discussion_crumb = true;
if ($data['object_type'] == 'E') {
// testimonials
$show_discussion_crumb = false;
}
$discussion_object_data = fn_get_discussion_object_data($data['object_id'], $data['object_type']);
fn_add_breadcrumb($discussion_object_data['description'], $discussion_object_data['url']);
if ($show_discussion_crumb && AREA != 'A') {
fn_add_breadcrumb(__('discussion'));
}
if (!empty($_SESSION['discussion_post_id'])) {
Registry::get('view')->assign('current_post_id', $_SESSION['discussion_post_id']);
unset($_SESSION['discussion_post_id']);
}
$discussion = fn_get_discussion($data['object_id'], $data['object_type'], true, $_REQUEST);
Registry::get('view')->assign('search', $discussion['search']);
Registry::get('view')->assign('object_id', $data['object_id']);
Registry::get('view')->assign('title', $discussion_object_data['description']);
Registry::get('view')->assign('object_type', $data['object_type']);
}
function fn_discussion_get_object_by_thread($thread_id)
{
static $cache = array();
if (empty($cache[$thread_id])) {
$cache[$thread_id] = db_get_row("SELECT object_type, object_id, type FROM ?:discussion WHERE thread_id = ?i", $thread_id);
}
return $cache[$thread_id];
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:discussion.php
示例3: die
/***************************************************************************
* *
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
* *
* This is commercial software, only users who have purchased a valid *
* license and accept to the terms of the License Agreement can install *
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (!empty($_REQUEST['discussion']) && !empty($_REQUEST['discussion']['object_id']) && !empty($_REQUEST['discussion']['object_type'])) {
$discussion = fn_get_discussion($_REQUEST['discussion']['object_id'], $_REQUEST['discussion']['object_type']);
if (!empty($discussion['thread_id'])) {
db_query('UPDATE ?:discussion SET ?u WHERE thread_id = ?i', $_REQUEST['discussion'], $discussion['thread_id']);
} else {
$_data = $_REQUEST['discussion'];
if (fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {
$_data['company_id'] = Registry::get('runtime.company_id');
}
db_query("REPLACE INTO ?:discussion ?e", $_data);
}
}
return;
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:init.post.php
示例4: die
<?php
//
// $Id: news.post.php 7502 2009-05-19 14:54:59Z zeke $
//
if (!defined('AREA')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
return;
}
if ($mode == 'update') {
$discussion = fn_get_discussion($_REQUEST['news_id'], 'N');
if (!empty($discussion) && $discussion['type'] != 'D') {
Registry::set('navigation.tabs.discussion', array('title' => fn_get_lang_var('discussion_title_news'), 'js' => true));
$view->assign('discussion', $discussion);
}
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:18,代码来源:news.post.php
示例5: die
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($mode == 'update') {
if (!empty($_REQUEST['posts'])) {
fn_update_discussion_posts($_REQUEST['posts']);
}
}
return;
}
if ($mode == 'update') {
$page = Tygh::$app['view']->getTemplateVars('page_data');
$discussion = fn_get_discussion($_REQUEST['page_id'], 'A', true, $_REQUEST);
if (!empty($discussion) && $discussion['type'] != 'D' && $page['page_type'] != PAGE_TYPE_LINK) {
if (fn_allowed_for('MULTIVENDOR') || fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {
Registry::set('navigation.tabs.discussion', array('title' => __('discussion_title_page'), 'js' => true));
Tygh::$app['view']->assign('discussion', $discussion);
}
}
} elseif ($mode == 'm_update') {
if ($selected_fields['discussion_type'] == 'Y') {
$field_names['discussion_type'] = __('discussion_title_page');
$fields2update[] = 'discussion_type';
}
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:pages.post.php
示例6: fn_get_discussion
if (!empty($_REQUEST['discussion'])) {
$discussion = fn_get_discussion($_REQUEST['discussion']['object_id'], $_REQUEST['discussion']['object_type']);
if (!empty($discussion['thread_id']) && $discussion['type'] != $_REQUEST['discussion']['type']) {
db_query('UPDATE ?:discussion SET ?u WHERE thread_id = ?i', $_REQUEST['discussion'], $discussion['thread_id']);
if ($_REQUEST['discussion']['type'] != 'D') {
$_REQUEST['selected_section'] = 'discussion';
}
} elseif (empty($discussion['thread_id'])) {
$data = $_REQUEST['discussion'];
if (fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {
$data['company_id'] = Registry::get('runtime.company_id');
} elseif (fn_allowed_for('ULTIMATE') && Registry::get('runtime.simple_ultimate')) {
$data['company_id'] = Registry::get('runtime.forced_company_id');
}
db_query("REPLACE INTO ?:discussion ?e", $data);
if ($_REQUEST['discussion']['type'] != 'D') {
$_REQUEST['selected_section'] = 'discussion';
}
}
}
}
}
if ($mode == 'details') {
$discussion = fn_get_discussion($_REQUEST['order_id'], 'O', true, $_REQUEST);
if (!empty($discussion) && $discussion['type'] != 'D') {
if (fn_allowed_for('MULTIVENDOR') || fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id') || Registry::get('runtime.simple_ultimate')) {
Registry::set('navigation.tabs.discussion', array('title' => __('communication'), 'js' => true));
Registry::get('view')->assign('discussion', $discussion);
}
}
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:31,代码来源:orders.post.php
示例7: die
<?php
/***************************************************************************
* *
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
* *
* This is commercial software, only users who have purchased a valid *
* license and accept to the terms of the License Agreement can install *
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($mode == 'view' || $mode == 'quick_view') {
$product = Registry::get('view')->getTemplateVars('product');
$product['discussion'] = fn_get_discussion($product['product_id'], "P", true, $_REQUEST);
Registry::get('view')->assign('product', $product);
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:23,代码来源:products.post.php
示例8: die
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
* *
* This is commercial software, only users who have purchased a valid *
* license and accept to the terms of the License Agreement can install *
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($mode == 'update') {
if (!empty($_REQUEST['posts'])) {
fn_update_discussion_posts($_REQUEST['posts']);
}
}
return;
}
if ($mode == 'update') {
$discussion = fn_get_discussion($_REQUEST['news_id'], 'N', true, $_REQUEST);
if (!empty($discussion) && $discussion['type'] != 'D') {
if (fn_allowed_for('MULTIVENDOR') || fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {
Registry::set('navigation.tabs.discussion', array('title' => __('discussion_title_news'), 'js' => true));
Registry::get('view')->assign('discussion', $discussion);
}
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:news.post.php
示例9: die
<?php
/***************************************************************************
* *
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
* *
* This is commercial software, only users who have purchased a valid *
* license and accept to the terms of the License Agreement can install *
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($mode == 'initiate_discussion' && !empty($_REQUEST['order_id'])) {
$_data = array('object_id' => $_REQUEST['order_id'], 'object_type' => 'O', 'type' => 'C');
$discussion = fn_get_discussion($_REQUEST['order_id'], 'O');
if (!empty($discussion['thread_id'])) {
db_query("UPDATE ?:discussion SET ?u WHERE thread_id = ?i", $_data, $discussion['thread_id']);
} else {
if (fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {
$_data['company_id'] = Registry::get('runtime.company_id');
}
db_query("REPLACE INTO ?:discussion ?e", $_data);
}
return array(CONTROLLER_STATUS_REDIRECT, "orders.details?order_id={$_REQUEST['order_id']}&selected_section=discussion");
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:orders.pre.php
示例10: content_55d7320b9467b7_31111710
function content_55d7320b9467b7_31111710($_smarty_tpl)
{
if (!is_callable('smarty_block_hook')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
}
if (!is_callable('smarty_modifier_date_format')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.date_format.php';
}
if (!is_callable('smarty_function_cycle')) {
include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.cycle.php';
}
if (!is_callable('smarty_modifier_replace')) {
include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/modifier.replace.php';
}
if (!is_callable('smarty_function_set_id')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php';
}
fn_preload_lang_vars(array('write_review', 'new_post', 'no_posts_found', 'sign_in', 'purchase_to_review', 'sign_in_and_purchase_to_review', 'sign_in', 'sign_in', 'sign_in_to_review', 'sign_in', 'write_review', 'new_post', 'no_posts_found', 'sign_in', 'purchase_to_review', 'sign_in_and_purchase_to_review', 'sign_in', 'sign_in', 'sign_in_to_review', 'sign_in'));
if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") {
$_smarty_tpl->_capture_stack[0][] = array("template_content", null, null);
ob_start();
$_smarty_tpl->tpl_vars["discussion"] = new Smarty_variable(fn_get_discussion($_smarty_tpl->tpl_vars['object_id']->value, $_smarty_tpl->tpl_vars['object_type']->value, true, $_REQUEST), null, 0);
if ($_smarty_tpl->tpl_vars['object_type']->value == "P") {
?>
<?php
$_smarty_tpl->tpl_vars['new_post_title'] = new Smarty_variable($_smarty_tpl->__("write_review"), null, 0);
} else {
?>
<?php
$_smarty_tpl->tpl_vars['new_post_title'] = new Smarty_variable($_smarty_tpl->__("new_post"), null, 0);
}
if ($_smarty_tpl->tpl_vars['discussion']->value && $_smarty_tpl->tpl_vars['discussion']->value['type'] != "D") {
?>
<div class="discussion-block" id="<?php
if ($_smarty_tpl->tpl_vars['container_id']->value) {
echo htmlspecialchars($_smarty_tpl->tpl_vars['container_id']->value, ENT_QUOTES, 'UTF-8');
} else {
?>
content_discussion<?php
}
?>
">
<?php
if ($_smarty_tpl->tpl_vars['wrap']->value == true) {
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("content", null, null);
ob_start();
?>
<?php
echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => $_smarty_tpl->tpl_vars['title']->value), 0);
?>
<?php
}
?>
<?php
if ($_smarty_tpl->tpl_vars['subheader']->value) {
?>
<h4><?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['subheader']->value, ENT_QUOTES, 'UTF-8');
?>
</h4>
<?php
}
?>
<div id="posts_list">
<?php
if ($_smarty_tpl->tpl_vars['discussion']->value['posts']) {
?>
<?php
echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "pagination_contents_comments_" . (string) $_smarty_tpl->tpl_vars['object_id']->value, 'extra_url' => "&selected_section=discussion", 'search' => $_smarty_tpl->tpl_vars['discussion']->value['search']), 0);
?>
<?php
$_smarty_tpl->tpl_vars['post'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['post']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['discussion']->value['posts'];
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
foreach ($_from as $_smarty_tpl->tpl_vars['post']->key => $_smarty_tpl->tpl_vars['post']->value) {
$_smarty_tpl->tpl_vars['post']->_loop = true;
?>
<div class="ty-discussion-post__content">
<?php
$_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "discussion:items_list_row"));
$_block_repeat = true;
echo smarty_block_hook(array('name' => "discussion:items_list_row"), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
?>
<span class="ty-discussion-post__author"><?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['post']->value['name'], ENT_QUOTES, 'UTF-8');
?>
</span>
<span class="ty-discussion-post__date"><?php
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:3ff47ab4866ce5cf980123b66a6a76ddd2be451c.tygh.view.tpl.php
示例11: die
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($mode == 'update') {
if (!empty($_REQUEST['posts'])) {
fn_update_discussion_posts($_REQUEST['posts']);
}
}
return;
}
if ($mode == 'update') {
$discussion = fn_get_discussion($_REQUEST['product_id'], 'P', true, $_REQUEST);
if (!empty($discussion) && $discussion['type'] != 'D') {
if (fn_allowed_for('MULTIVENDOR') || fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {
Registry::set('navigation.tabs.discussion', array('title' => __('discussion_title_product'), 'js' => true));
Tygh::$app['view']->assign('discussion', $discussion);
}
}
} elseif ($mode == 'manage') {
$selected_fields = Tygh::$app['view']->getTemplateVars('selected_fields');
$selected_fields[] = array('name' => '[products_data][discussion_type]', 'text' => __('discussion_title_product'));
Tygh::$app['view']->assign('selected_fields', $selected_fields);
} elseif ($mode == 'm_update') {
$selected_fields = $_SESSION['selected_fields'];
if (!empty($selected_fields['products_data'])) {
$field_groups = Tygh::$app['view']->getTemplateVars('field_groups');
$filled_groups = Tygh::$app['view']->getTemplateVars('filled_groups');
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:products.post.php
示例12: content_55cdb2ac85faf1_67964872
function content_55cdb2ac85faf1_67964872($_smarty_tpl)
{
fn_preload_lang_vars(array('communication', 'and', 'rating', 'communication', 'rating', 'disabled', 'communication', 'and', 'rating', 'communication', 'rating', 'disabled'));
?>
<div class="control-group <?php
if ($_smarty_tpl->tpl_vars['no_hide_input']->value) {
?>
cm-no-hide-input<?php
}
?>
">
<label class="control-label" for="discussion_type"><?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['title']->value, ENT_QUOTES, 'UTF-8');
?>
:</label>
<div class="controls">
<?php
$_smarty_tpl->tpl_vars["discussion"] = new Smarty_variable(fn_get_discussion($_smarty_tpl->tpl_vars['object_id']->value, $_smarty_tpl->tpl_vars['object_type']->value), null, 0);
?>
<?php
if (fn_check_view_permissions("discussion.add")) {
?>
<select name="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
?>
[discussion_type]" id="discussion_type">
<option <?php
if ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "B") {
?>
selected="selected"<?php
}
?>
value="B"><?php
echo $_smarty_tpl->__("communication");
?>
<?php
echo $_smarty_tpl->__("and");
?>
<?php
echo $_smarty_tpl->__("rating");
?>
</option>
<option <?php
if ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "C") {
?>
selected="selected"<?php
}
?>
value="C"><?php
echo $_smarty_tpl->__("communication");
?>
</option>
<option <?php
if ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "R") {
?>
selected="selected"<?php
}
?>
value="R"><?php
echo $_smarty_tpl->__("rating");
?>
</option>
<option <?php
if ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "D" || !$_smarty_tpl->tpl_vars['discussion']->value) {
?>
selected="selected"<?php
}
?>
value="D"><?php
echo $_smarty_tpl->__("disabled");
?>
</option>
</select>
<?php
} else {
?>
<span class="shift-input"><?php
if ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "B") {
echo $_smarty_tpl->__("communication");
?>
<?php
echo $_smarty_tpl->__("and");
?>
<?php
echo $_smarty_tpl->__("rating");
} elseif ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "C") {
echo $_smarty_tpl->__("communication");
} elseif ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "R") {
echo $_smarty_tpl->__("rating");
} else {
echo $_smarty_tpl->__("disabled");
}
?>
</span>
<?php
}
?>
</div>
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:4134a7f87b033a109467cbbc751ae2a241efdcbd.tygh.allow_discussion.tpl.php
示例13: die
<?php
//
// $Id: products.post.php 7502 2009-05-19 14:54:59Z zeke $
//
if (!defined('AREA')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
return;
}
if ($mode == 'update') {
$discussion = fn_get_discussion($_REQUEST['product_id'], 'P');
if (!empty($discussion) && $discussion['type'] != 'D') {
Registry::set('navigation.tabs.discussion', array('title' => fn_get_lang_var('discussion_title_product'), 'js' => true));
$view->assign('discussion', $discussion);
}
} elseif ($mode == 'manage') {
$selected_fields = $view->get_var('selected_fields');
$selected_fields[] = array('name' => '[products_data][discussion_type]', 'text' => fn_get_lang_var('discussion_title_product'));
$view->assign('selected_fields', $selected_fields);
} elseif ($mode == 'm_update') {
$selected_fields = $_SESSION['selected_fields'];
if (!empty($selected_fields['products_data'])) {
$field_groups = $view->get_var('field_groups');
$filled_groups = $view->get_var('filled_groups');
$field_groups['S']['discussion_type'] = array('name' => 'products_data', 'variants' => array('D' => fn_get_lang_var('disabled'), 'C' => fn_get_lang_var('communication'), 'R' => fn_get_lang_var('rating'), 'B' => fn_get_lang_var('all')));
$filled_groups['S']['discussion_type'] = fn_get_lang_var('discussion_title_product');
$view->assign('field_groups', $field_groups);
$view->assign('filled_groups', $filled_groups);
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:products.post.php
示例14: fn_update_discussion
function fn_update_discussion($params)
{
$_data = fn_check_table_fields($params, 'discussion');
$discussion = fn_get_discussion($params['object_id'], $params['object_type']);
if (!empty($discussion['thread_id'])) {
db_query("UPDATE ?:discussion SET ?u WHERE thread_id = ?i", $_data, $discussion['thread_id']);
} else {
db_query("REPLACE INTO ?:discussion ?e", $_data);
}
return true;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:11,代码来源:func.php
示例15: die
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
return;
}
if ($mode == 'view') {
$page_data = Tygh::$app['view']->getTemplateVars('page');
if ($page_data['page_type'] == PAGE_TYPE_PROJECTS) {
list($subpages, $search) = fn_get_pages(array('parent_id' => $page_data['page_id'], 'page' => !empty($_REQUEST['page']) ? $_REQUEST['page'] : 0, 'page_type' => PAGE_TYPE_PROJECTS, 'get_image' => true, 'status' => 'A', 'sort_by' => 'timestamp', 'sort_order' => 'desc'), Registry::get('settings.Appearance.elements_per_page'));
if (!empty($subpages)) {
foreach ($subpages as &$subpage) {
$subpage['discussion'] = fn_get_discussion($subpage['page_id'], 'A', true);
//fn_print_die($subpage['page_id'],$discussion);
}
} else {
$page_data['discussion'] = fn_get_discussion($page_data['page_id'], 'A', true);
}
//fn_print_die($discussion,$page_data,$subpages);
Tygh::$app['view']->assign('page', $page_data);
Tygh::$app['view']->assign('subpages', $subpages);
Tygh::$app['view']->assign('search', $search);
}
}
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:pages.post.php
示例16: die
<?php
//
// $Id: events.post.php 7502 2009-05-19 14:54:59Z zeke $
//
if (!defined('AREA')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
return;
}
if ($mode == 'update') {
$discussion = fn_get_discussion($_REQUEST['event_id'], 'G');
if (!empty($discussion) && $discussion['type'] != 'D') {
Registry::set('navigation.tabs.discussion', array('title' => fn_get_lang_var('discussion_title_giftreg'), 'js' => true));
$view->assign('discussion', $discussion);
}
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:18,代码来源:events.post.php
示例17: content_55d5c759232616_54699455
function content_55d5c759232616_54699455($_smarty_tpl)
{
fn_preload_lang_vars(array('discussion', 'discussion_title_order', 'disabled', 'enabled', 'enabled', 'disabled'));
if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("ULTIMATE") || fn_allowed_for("MULTIVENDOR") || $_smarty_tpl->tpl_vars['runtime']->value['simple_ultimate']) {
?>
<?php
$_smarty_tpl->tpl_vars["discussion"] = new Smarty_variable(fn_get_discussion($_smarty_tpl->tpl_vars['order_info']->value['order_id'], "O"), null, 0);
?>
<?php
echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("discussion")), 0);
?>
<div class="control-group">
<label class="control-label"><?php
echo $_smarty_tpl->__("discussion_title_order");
?>
</label>
<div class="controls">
<?php
if (fn_check_view_permissions("discussion.add")) {
?>
<input type="hidden" name="discussion[object_id]" value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['order_info']->value['order_id'], ENT_QUOTES, 'UTF-8');
?>
" />
<input type="hidden" name="discussion[object_type]" value="O" />
<select name="discussion[type]">
<option <?php
if ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "D") {
?>
selected="selected"<?php
}
?>
value="D"><?php
echo $_smarty_tpl->__("disabled");
?>
</option>
<option <?php
if ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "C") {
?>
selected="selected"<?php
}
?>
value="C"><?php
echo $_smarty_tpl->__("enabled");
?>
</option>
</select>
<?php
} else {
?>
<span class="shift-input"><?php
if ($_smarty_tpl->tpl_vars['discussion']->value['type'] == "C") {
echo $_smarty_tpl->__("enabled");
} else {
echo $_smarty_tpl->__("disabled");
}
?>
</span>
<?php
}
?>
</div>
</div>
<?php
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:70,代码来源:4ec03e356ecef7b4803f5be32d2590f2fb5d9b02.tygh.customer_info.post.tpl.php
示例18: die
<?php
//
// $Id: pages.post.php 7502 2009-05-19 14:54:59Z zeke $
//
if (!defined('AREA')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
return;
}
if ($mode == 'update') {
$page = $view->get_var('page_data');
$discussion = fn_get_discussion($_REQUEST['page_id'], 'A');
if (!empty($discussion) && $discussion['type'] != 'D' && $page['page_type'] != PAGE_TYPE_LINK) {
Registry::set('navigation.tabs.discussion', array('title' => fn_get_lang_var('discussion_title_page'), 'js' => true));
$view->assign('discussion', $discussion);
}
} elseif ($mode == 'm_update') {
if ($selected_fields['discussion_type'] == 'Y') {
$field_names['discussion_type'] = fn_get_lang_var('discussion_title_page');
$fields2update[] = 'discussion_type';
}
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:24,代码来源:pages.post.php
示例19: fn_get_review_count
function fn_get_review_count($object_id, $object_type, $thread_id = 0)
{
if (!$thread_id) {
global $db_tables;
$discussion = fn_get_discussion($object_id, $object_type);
if (empty($discussion)) {
return false;
}
$thread_id = $discussion['thread_id'];
}
return db_get_field("SELECT COUNT(b.post_id) as val FROM ?:discussion_rating as a LEFT JOIN ?:discussion_posts as b ON a.post_id = b.post_id WHERE a.thread_id = ?i and b.status = 'A'", $thread_id);
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:12,代码来源:func.php
示例20: __
$title = $data['is_like'] ? __('you_like_this') : __('you_not_like_this');
$msg = __('thanks_for_vote');
fn_set_notification('N', $title, $msg);
} else {
fn_set_notification('E', __('error'), __('no_more_vote'), 'I');
}
}
exit;
}
if ($mode == 'view_posts') {
$posts = array();
$object_id = $_REQUEST["object_id"];
if ($object_id) {
$object_type = $_REQUEST['object_type'];
$page = $_REQUEST["page"];
$discussion = fn_get_discussion($object_id, $object_type, true, $_REQUEST);
$attributes = fn_get_review_attributes_work($object_id);
$no_atributes = true;
if ($attributes) {
$no_atributes = false;
}
$ratings = fn_get_review_ratings($discussion["thread_id"], $no_atributes);
$posts = fn_get_review_posts($discussion['thread_id'], $page);
}
Registry::set('runtime.root_template', 'addons/altteam_review_attributes/views/view_posts.tpl');
$discussion_object_types = array('P' => 'product', 'C' => 'category', 'A' => 'page', 'O' => 'order', 'E' => 'home_page');
//get the values from the settings
$getDiscutionsPostPerPageSettings = db_get_field("\n SELECT ?:settings_objects.value\n FROM ?:settings_objects\n JOIN ?:settings_sections ON ?:settings_sections.section_id = ?:settings_objects.section_id\n WHERE \n ?:settings_sections.name = 'discussion'\n AND ?:settings_objects.name=?s\n ", $discussion_object_types[$object_type] . "_posts_per_page");
//
$total_posts = db_get_field("SELECT COUNT(*) FROM ?:discussion_posts WHERE ?:discussion_posts.status = 'A' AND ?:discussion_posts.thread_id=?i", $discussion["thread_id"]);
if ($page * $getDiscutionsPostPerPageSettings >= $total_posts) {
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:review_attributes.php
注:本文中的fn_get_discussion函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论