• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fn_get_usergroups函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fn_get_usergroups函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_get_usergroups函数的具体用法?PHP fn_get_usergroups怎么用?PHP fn_get_usergroups使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fn_get_usergroups函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: index

 public function index($id = '', $params = array())
 {
     $lang_code = $this->safeGet($params, 'lang_code', DEFAULT_LANGUAGE);
     if (isset($params['lang_code'])) {
         unset($params['lang_code']);
     }
     if ($this->getParentName() == 'users') {
         if (empty($id)) {
             return $this->showForUser($params);
         } else {
             return array('status' => Response::STATUS_BAD_REQUEST);
         }
     }
     if (empty($id)) {
         $data = fn_get_usergroups($params, $lang_code);
         $status = Response::STATUS_OK;
     } else {
         $data = fn_get_usergroups(array('usergroup_id' => (int) $id, 'with_privileges' => true, 'include_default' => true), $lang_code);
         $data = reset($data);
         $status = empty($data) ? Response::STATUS_NOT_FOUND : Response::STATUS_OK;
     }
     return array('status' => $status, 'data' => $data);
 }
开发者ID:askzap,项目名称:ultimate,代码行数:23,代码来源:Usergroups.php


示例2: fn_get_user_info

     $user_data = fn_get_user_info($auth['user_id'], true, $profile_id);
 }
 if (empty($user_data)) {
     return array(CONTROLLER_STATUS_NO_PAGE);
 }
 $restored_user_data = fn_restore_post_data('user_data');
 if ($restored_user_data) {
     $user_data = fn_array_merge($user_data, $restored_user_data);
 }
 Registry::set('navigation.tabs.general', array('title' => __('general'), 'js' => true));
 $show_usergroups = true;
 if (Registry::get('settings.General.allow_usergroup_signup') != 'Y') {
     $show_usergroups = fn_user_has_active_usergroups($user_data);
 }
 if ($show_usergroups) {
     $usergroups = fn_get_usergroups('C');
     if (!empty($usergroups)) {
         Registry::set('navigation.tabs.usergroups', array('title' => __('usergroups'), 'js' => true));
         Registry::get('view')->assign('usergroups', $usergroups);
     }
 }
 $profile_fields = fn_get_profile_fields();
 //  echo 'profile fields:'; var_dump($profile_fields);
 //check if the user has uploaded a image
 $target_dir = "/images/user_profile/";
 //insert user id here
 $base_url = $_SERVER['DOCUMENT_ROOT'];
 $ls_image_name = $auth['user_id'] . '.jpg';
 //replace with user id
 $target_file = $base_url . $target_dir . $ls_image_name;
 if (file_exists($target_file)) {
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:profiles.php


示例3: content_55ddd1046232f5_25391883


//.........这里部分代码省略.........
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="elm_category_meta_keywords"><?php 
        echo $_smarty_tpl->__("meta_keywords");
        ?>
:</label>
        <div class="controls">
            <textarea name="category_data[meta_keywords]" id="elm_category_meta_keywords" cols="55" rows="4" class="input-large"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['meta_keywords'], ENT_QUOTES, 'UTF-8');
        ?>
</textarea>
        </div>
    </div>
    </div>
    <hr />
    <?php 
        if (!fn_allowed_for("ULTIMATE:FREE")) {
            ?>
    <?php 
            echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("availability"), 'target' => "#acc_availability"), 0);
            ?>

    <div id="acc_availability">
    <div class="control-group">
        <label class="control-label"><?php 
            echo $_smarty_tpl->__("usergroups");
            echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("ttc_usergroups")), 0);
            ?>
:</label>
            <div class="controls">
                <?php 
            echo $_smarty_tpl->getSubTemplate("common/select_usergroups.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "ug_id", 'name' => "category_data[usergroup_ids]", 'usergroups' => fn_get_usergroups("C", @constant('DESCR_SL')), 'usergroup_ids' => $_smarty_tpl->tpl_vars['category_data']->value['usergroup_ids'], 'input_extra' => '', 'list_mode' => false), 0);
            ?>

                <label class="checkbox" for="usergroup_to_subcats"><?php 
            echo $_smarty_tpl->__("to_all_subcats");
            ?>

                    <input id="usergroup_to_subcats" type="checkbox" name="category_data[usergroup_to_subcats]" value="Y" />
                </label>
            </div>
    </div>
    <?php 
        }
        ?>

    <div class="control-group">
        <label class="control-label" for="elm_category_position"><?php 
        echo $_smarty_tpl->__("position");
        ?>
:</label>
        <div class="controls">
            <input type="text" name="category_data[position]" id="elm_category_position" size="10" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['position'], ENT_QUOTES, 'UTF-8');
        ?>
" class="input-text-short" />
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="elm_category_creation_date"><?php 
        echo $_smarty_tpl->__("creation_date");
        ?>
:</label>
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:67,代码来源:f4201e420b9f112a9a7021cbe52e2b71547773e0.tygh.update.tpl.php


示例4: fn_get_payment_method_data

 if (!empty($cart['payment_id'])) {
     $payment_info = fn_get_payment_method_data($cart['payment_id']);
     Tygh::$app['view']->assign('payment_info', $payment_info);
     if (!empty($payment_info['processor_params']['iframe_mode']) && $payment_info['processor_params']['iframe_mode'] == 'Y') {
         Tygh::$app['view']->assign('iframe_mode', true);
     }
 }
 Tygh::$app['view']->assign('payment_methods', $payment_methods);
 $cart['payment_surcharge'] = 0;
 if (!empty($cart['payment_id']) && !empty($payment_info)) {
     fn_update_payment_surcharge($cart, $auth);
 }
 if (fn_allowed_for('MULTIVENDOR')) {
     Tygh::$app['view']->assign('take_surcharge_from_vendor', fn_take_payment_surcharge_from_vendor($cart['products']));
 }
 Tygh::$app['view']->assign('usergroups', fn_get_usergroups(array('type' => 'C', 'status' => 'A'), CART_LANGUAGE));
 Tygh::$app['view']->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE));
 Tygh::$app['view']->assign('states', fn_get_all_states());
 $cart['ship_to_another'] = fn_check_shipping_billing($cart['user_data'], $profile_fields);
 Tygh::$app['view']->assign('profile_fields', $profile_fields);
 if (Registry::get('settings.General.user_multiple_profiles') == 'Y') {
     $user_profiles = fn_get_user_profiles($auth['user_id']);
     Tygh::$app['view']->assign('user_profiles', $user_profiles);
 }
 fn_checkout_summary($cart);
 Tygh::$app['view']->assign('use_ajax', 'true');
 Tygh::$app['view']->assign('completed_steps', $completed_steps);
 Tygh::$app['view']->assign('location', 'checkout');
 Tygh::$app['view']->assign('cart', $cart);
 Tygh::$app['view']->assign('cart_products', array_reverse($cart_products, true));
 Tygh::$app['view']->assign('product_groups', $cart['product_groups']);
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:checkout.php


示例5: content_55e61f9b88e479_88067551


//.........这里部分代码省略.........
" size="60" class="input-medium" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['attachment']->value['description'], ENT_QUOTES, 'UTF-8');
        ?>
" />
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_position_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("position");
        ?>
</label>
            <div class="controls">
                <input type="text" name="attachment_data[position]" id="elm_position_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" size="3" class="input-micro" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['attachment']->value['position'], ENT_QUOTES, 'UTF-8');
        ?>
" />
            </div>
        </div>

        <div class="control-group">
            <label for="type_<?php 
        echo htmlspecialchars(md5("attachment_files[" . (string) $_smarty_tpl->tpl_vars['id']->value . "]"), ENT_QUOTES, 'UTF-8');
        ?>
" class="control-label <?php 
        if (!$_smarty_tpl->tpl_vars['attachment']->value) {
            ?>
cm-required<?php 
        }
        ?>
"><?php 
        echo $_smarty_tpl->__("file");
        ?>
</label>
            <div class="controls">
                <?php 
        if ($_smarty_tpl->tpl_vars['attachment']->value['filename']) {
            ?>
                    <div class="text-type-value">
                        <a href="<?php 
            echo htmlspecialchars(fn_url("attachments.getfile?attachment_id=" . (string) $_smarty_tpl->tpl_vars['attachment']->value['attachment_id'] . "&object_type=" . (string) $_smarty_tpl->tpl_vars['object_type']->value . "&object_id=" . (string) $_smarty_tpl->tpl_vars['object_id']->value), ENT_QUOTES, 'UTF-8');
            ?>
"><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['attachment']->value['filename'], ENT_QUOTES, 'UTF-8');
            ?>
</a> (<?php 
            echo smarty_modifier_formatfilesize($_smarty_tpl->tpl_vars['attachment']->value['filesize']);
            ?>
)
                    </div>
                <?php 
        }
        ?>
                <?php 
        echo $_smarty_tpl->getSubTemplate("common/fileuploader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('var_name' => "attachment_files[" . (string) $_smarty_tpl->tpl_vars['id']->value . "]"), 0);
        ?>
</div>
        </div>

        <div class="control-group">
            <label class="control-label"><?php 
        echo $_smarty_tpl->__("usergroups");
        ?>
</label>
            <div class="controls">
                <?php 
        echo $_smarty_tpl->getSubTemplate("common/select_usergroups.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "elm_usergroup_" . (string) $_smarty_tpl->tpl_vars['id']->value, 'name' => "attachment_data[usergroup_ids]", 'usergroups' => fn_get_usergroups(array("type" => "C", "status" => array("A", "H"))), 'usergroup_ids' => $_smarty_tpl->tpl_vars['attachment']->value['usergroup_ids'], 'input_extra' => '', 'list_mode' => false), 0);
        ?>

            </div>
        </div>
    </div>
</div>

<div class="buttons-container">
    <?php 
        if ($_smarty_tpl->tpl_vars['id']->value) {
            ?>
        <?php 
            $_smarty_tpl->tpl_vars["hide_first_button"] = new Smarty_variable($_smarty_tpl->tpl_vars['hide_inputs']->value, null, 0);
            ?>
    <?php 
        }
        ?>

    <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[attachments.update]", 'cancel_action' => "close", 'hide_first_button' => $_smarty_tpl->tpl_vars['hide_first_button']->value, 'save' => $_smarty_tpl->tpl_vars['id']->value), 0);
        ?>

</div>

</form>
<?php 
    }
开发者ID:AlanIsrael0,项目名称:market,代码行数:101,代码来源:991cb8f161559dfc44d87dd141e3f947b9e4b603.tygh.update.tpl.php


示例6: fn_get_payment_method_data

 if (!empty($cart['payment_id'])) {
     $payment_info = fn_get_payment_method_data($cart['payment_id']);
     Registry::get('view')->assign('payment_info', $payment_info);
     if (!empty($payment_info['processor_params']['iframe_mode']) && $payment_info['processor_params']['iframe_mode'] == 'Y') {
         Registry::get('view')->assign('iframe_mode', true);
     }
 }
 Registry::get('view')->assign('payment_methods', $payment_methods);
 $cart['payment_surcharge'] = 0;
 if (!empty($cart['payment_id']) && !empty($payment_info)) {
     fn_update_payment_surcharge($cart, $auth);
 }
 if (fn_allowed_for('MULTIVENDOR')) {
     Registry::get('view')->assign('take_surcharge_from_vendor', fn_take_payment_surcharge_from_vendor($cart['products']));
 }
 Registry::get('view')->assign('usergroups', fn_get_usergroups('C', CART_LANGUAGE));
 Registry::get('view')->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE));
 Registry::get('view')->assign('states', fn_get_all_states());
 $cart['ship_to_another'] = fn_check_shipping_billing($cart['user_data'], $profile_fields);
 Registry::get('view')->assign('profile_fields', $profile_fields);
 if (Registry::get('settings.General.user_multiple_profiles') == 'Y') {
     $user_profiles = fn_get_user_profiles($auth['user_id']);
     Registry::get('view')->assign('user_profiles', $user_profiles);
 }
 fn_checkout_summary($cart);
 if ($edit_step == 'step_two' && !empty($completed_steps['step_one']) && empty($profile_fields['B']) && empty($profile_fields['S'])) {
     $edit_step = 'step_four';
 }
 // If we're on shipping step and shipping is not required, switch to payment step
 //FIXME
 /* if ($edit_step == 'step_three' && $cart['shipping_required'] != true) {
开发者ID:OneataBogdan,项目名称:coriolan_backup,代码行数:31,代码来源:checkout.php


示例7: unset

        $tabs['configure']['hidden'] = 'Y';
    }
    if (Registry::get('runtime.company_id') && Registry::get('runtime.company_id') != $shipping['company_id']) {
        unset($tabs['configure']);
        Tygh::$app['view']->assign('hide_for_vendor', true);
    }
    Registry::set('navigation.tabs', $tabs);
    Tygh::$app['view']->assign('services', $services);
    Tygh::$app['view']->assign('carriers', fn_get_carriers_from_services($services));
    Tygh::$app['view']->assign('taxes', fn_get_taxes());
    Tygh::$app['view']->assign('usergroups', fn_get_usergroups(array('type' => 'C', 'status' => array('A', 'H')), DESCR_SL));
    // Show all shipping methods
} elseif ($mode == 'manage') {
    $company_id = Registry::ifGet('runtime.company_id', null);
    Tygh::$app['view']->assign('shippings', fn_get_available_shippings($company_id));
    Tygh::$app['view']->assign('usergroups', fn_get_usergroups(array('type' => 'C', 'status' => array('A', 'H')), DESCR_SL));
}
function fn_delete_rate_values($delete_rate_data, $shipping_id, $destination_id)
{
    $rate_values = db_get_field("SELECT rate_value FROM ?:shipping_rates WHERE shipping_id = ?i AND destination_id = ?i", $shipping_id, $destination_id);
    if (!empty($rate_values)) {
        $rate_values = unserialize($rate_values);
    }
    foreach ((array) $rate_values as $rate_type => $rd) {
        foreach ((array) $rd as $amount => $data) {
            if (isset($delete_rate_data[$rate_type][$amount]) && $delete_rate_data[$rate_type][$amount] == 'Y') {
                unset($rate_values[$rate_type][$amount]);
            }
        }
    }
    if (is_array($rate_values)) {
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:shippings.php


示例8: foreach

                            foreach ($companies as $company_id => $name) {
                                fn_add_reward_points($v, 0, GLOBAL_REWARD_POINTS, $company_id);
                            }
                        }
                        continue;
                    }
                }
                fn_add_reward_points($v, 0, GLOBAL_REWARD_POINTS);
            }
        }
    }
    if ($mode == 'delete') {
        if (!empty($_REQUEST['change_id'])) {
            db_query("DELETE FROM ?:reward_point_changes WHERE change_id = ?i", $_REQUEST['change_id']);
        }
        return array(CONTROLLER_STATUS_REDIRECT, 'reward_points.userlog?user_id=' . $_REQUEST['user_id']);
    }
    return array(CONTROLLER_STATUS_OK, 'reward_points.manage');
}
if ($mode == 'manage') {
    // Add new tab to page sections
    Registry::set('navigation.tabs.reward_points', array('title' => __('reward_points'), 'js' => true));
    Registry::get('view')->assign('reward_points', fn_get_reward_points(0, GLOBAL_REWARD_POINTS));
    Registry::get('view')->assign('object_type', GLOBAL_REWARD_POINTS);
} elseif ($mode == 'add') {
    // Add new tab to page sections
    Registry::set('navigation.tabs.reward_points', array('title' => __('reward_points'), 'js' => true));
    Registry::get('view')->assign('object_type', GLOBAL_REWARD_POINTS);
}
Registry::get('view')->assign('reward_usergroups', fn_get_usergroups(array('type' => 'C', 'status' => array('A', 'H'), 'include_default' => true)));
/** /Body **/
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:31,代码来源:reward_points.php


示例9: fn_send_usergroup_status_notification

function fn_send_usergroup_status_notification($user_id, $usergroup_ids, $status)
{
    $user_data = fn_get_user_info($user_id);
    $prefix = $status == 'A' ? 'activation' : 'disactivation';
    Mailer::sendMail(array('to' => $user_data['email'], 'from' => 'company_users_department', 'data' => array('user_data' => $user_data, 'usergroups' => fn_get_usergroups(array('status' => array('A', 'H')), $user_data['lang_code']), 'usergroup_ids' => $usergroup_ids), 'tpl' => 'profiles/usergroup_' . $prefix . '.tpl', 'company_id' => $user_data['company_id']), fn_check_user_type_admin_area($user_data['user_type']) ? 'A' : 'C', $user_data['lang_code']);
}
开发者ID:askzap,项目名称:ultimate,代码行数:6,代码来源:fn.users.php


示例10: fn_send_usergroup_status_notification

function fn_send_usergroup_status_notification($user_id, $usergroup_ids, $status)
{
    $user_data = fn_get_user_info($user_id);
    Registry::get('view_mail')->assign('user_data', $user_data);
    Registry::get('view_mail')->assign('usergroups', fn_get_usergroups('F', $user_data['lang_code']));
    Registry::get('view_mail')->assign('usergroup_ids', $usergroup_ids);
    $prefix = $status == 'A' ? 'activation' : 'disactivation';
    fn_send_mail($user_data['email'], Registry::get('settings.Company.company_users_department'), 'profiles/usergroup_' . $prefix . '_subj.tpl', 'profiles/usergroup_' . $prefix . '.tpl', array(), $user_data['lang_code']);
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:9,代码来源:usergroups.php


示例11: content_55ccecdc0884e3_29924886

    function content_55ccecdc0884e3_29924886($_smarty_tpl)
    {
        if (!is_callable('smarty_function_math')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.math.php';
        }
        if (!is_callable('smarty_function_cycle')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.cycle.php';
        }
        fn_preload_lang_vars(array('quantity', 'value', 'type', 'qty_discount_type_tooltip', 'usergroup', 'absolute', 'percent', 'absolute', 'percent', 'all', 'absolute', 'percent'));
        if (!fn_allowed_for("ULTIMATE:FREE")) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["usergroups"] = new Smarty_variable(fn_get_usergroups("C"), null, 0);
        }
        ?>

<div id="content_qty_discounts" class="hidden">
    <table class="table table-middle" width="100%">
    <thead class="cm-first-sibling">
    <tr>
        <th width="5%"><?php 
        echo $_smarty_tpl->__("quantity");
        ?>
</th>
        <th width="20%"><?php 
        echo $_smarty_tpl->__("value");
        ?>
</th>
        <th width="25%"><?php 
        echo $_smarty_tpl->__("type");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("qty_discount_type_tooltip")), 0);
        ?>
</th>
        <?php 
        if (!fn_allowed_for("ULTIMATE:FREE")) {
            ?>
            <th width="25%"><?php 
            echo $_smarty_tpl->__("usergroup");
            ?>
</th>
        <?php 
        }
        ?>
        <th width="15%">&nbsp;</th>
    </tr>
    </thead>
    <tbody>
    <?php 
        $_smarty_tpl->tpl_vars["price"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["price"]->_loop = false;
        $_smarty_tpl->tpl_vars["_key"] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['product_data']->value['prices'];
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["price"]->key => $_smarty_tpl->tpl_vars["price"]->value) {
            $_smarty_tpl->tpl_vars["price"]->_loop = true;
            $_smarty_tpl->tpl_vars["_key"]->value = $_smarty_tpl->tpl_vars["price"]->key;
            ?>
    <tr class="cm-row-item">
        <td width="5%" class="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
            <?php 
            if ($_smarty_tpl->tpl_vars['price']->value['lower_limit'] == "1" && $_smarty_tpl->tpl_vars['price']->value['usergroup_id'] == "0") {
                ?>
                &nbsp;<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['price']->value['lower_limit'], ENT_QUOTES, 'UTF-8');
                ?>

            <?php 
            } else {
                ?>
            <input type="text" name="product_data[prices][<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['_key']->value, ENT_QUOTES, 'UTF-8');
                ?>
][lower_limit]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['price']->value['lower_limit'], ENT_QUOTES, 'UTF-8');
                ?>
" class="input-micro" />
            <?php 
            }
            ?>
</td>
        <td width="20%" class="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
            <?php 
            if ($_smarty_tpl->tpl_vars['price']->value['lower_limit'] == "1" && $_smarty_tpl->tpl_vars['price']->value['usergroup_id'] == "0") {
                ?>
                &nbsp;<?php 
                if ($_smarty_tpl->tpl_vars['price']->value['percentage_discount'] == 0) {
                    echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['price']->value['price']) === null || $tmp === '' ? "0.00" : $tmp, ENT_QUOTES, 'UTF-8');
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['price']->value['percentage_discount'], ENT_QUOTES, 'UTF-8');
                }
                ?>
            <?php 
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:0309daf46365bb90712b4462a6bc5d1d7d3726eb.tygh.products_update_qty_discounts.tpl.php


示例12: db_query

    }
    if ($mode == 'do_cleanup_logs') {
        db_query("DELETE FROM ?:reward_point_changes WHERE user_id = ?i", $_REQUEST['user_id']);
    }
    // Add/Update wholesale prices info
    if ($mode == 'add' || $mode == 'update') {
        if (isset($_REQUEST['reward_points'])) {
            foreach ($_REQUEST['reward_points'] as $k => $v) {
                fn_add_reward_points($v, 0, GLOBAL_REWARD_POINTS);
            }
        }
    }
    return array(CONTROLLER_STATUS_OK, "reward_points.manage");
}
if ($mode == 'manage') {
    // Add new tab to page sections
    Registry::set('navigation.tabs.reward_points', array('title' => fn_get_lang_var('reward_points'), 'js' => true));
    $view->assign('reward_points', fn_get_reward_points(0, GLOBAL_REWARD_POINTS));
    $view->assign('object_type', GLOBAL_REWARD_POINTS);
} elseif ($mode == 'add') {
    // Add new tab to page sections
    Registry::set('navigation.tabs.reward_points', array('title' => fn_get_lang_var('reward_points'), 'js' => true));
    $view->assign('object_type', GLOBAL_REWARD_POINTS);
} elseif ($mode == 'do_userlog_delete') {
    if (!empty($_REQUEST['change_id'])) {
        db_query("DELETE FROM ?:reward_point_changes WHERE change_id = ?i", $_REQUEST['change_id']);
    }
    return array(CONTROLLER_STATUS_REDIRECT, "reward_points.userlog?user_id={$_REQUEST['user_id']}");
}
$view->assign('reward_usergroups', fn_array_merge(fn_get_default_usergroups(), fn_get_usergroups('C')));
/** /Body **/
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:reward_points.php


示例13: array

            } else {
                $uid = $auth['user_id'];
            }
            return array(CONTROLLER_STATUS_OK, "profiles.update?user_id={$uid}&profile_id={$_REQUEST['profile_id']}");
        }
    }
    exit;
} elseif ($mode == 'request_usergroup') {
    if (AREA == 'A' && fn_is_restricted_admin($_REQUEST) == true) {
        return array(CONTROLLER_STATUS_DENIED);
    }
    $uid = $auth['user_id'];
    if (!empty($uid)) {
        $_data = array('user_id' => $uid, 'usergroup_id' => $_REQUEST['usergroup_id']);
        if ($_REQUEST['status'] == 'A' || $_REQUEST['status'] == 'P') {
            $_data['status'] = 'F';
        } elseif ($_REQUEST['status'] == 'F' || $_REQUEST['status'] == 'D') {
            $_data['status'] = 'P';
            $usergroup_request = true;
        }
        db_query("REPLACE INTO ?:usergroup_links SET ?u", $_data);
        if (!empty($usergroup_request)) {
            $user_data = fn_get_user_info($uid);
            Registry::get('view_mail')->assign('user_data', $user_data);
            Registry::get('view_mail')->assign('usergroups', fn_get_usergroups('F', Registry::get('settings.Appearance.admin_default_language')));
            Registry::get('view_mail')->assign('usergroup_id', $_REQUEST['usergroup_id']);
            fn_send_mail(Registry::get('settings.Company.company_users_department'), Registry::get('settings.Company.company_users_department'), 'profiles/usergroup_request_subj.tpl', 'profiles/usergroup_request.tpl', '', Registry::get('settings.Appearance.admin_default_language'), $user_data['email']);
        }
    }
    return array(CONTROLLER_STATUS_OK, "profiles.update");
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:profiles.post.php


示例14: fn_promotion_post_processing

/**
 * Promotions post processing
 *
 * @param char $status_to new order status
 * @param char $status_from original order status
 * @param array $order_info order information
 * @param bool $force_notification force user notification
 * @return boolean always true
 */
function fn_promotion_post_processing($status_to, $status_from, $order_info, $force_notification = array())
{
    $order_statuses = fn_get_statuses(STATUSES_ORDER, false, true);
    $notify_user = isset($force_notification['C']) ? $force_notification['C'] : (!empty($order_statuses[$status_to]['notify']) && $order_statuses[$status_to]['notify'] == 'Y' ? true : false);
    if ($status_to != $status_from && $order_statuses[$status_to]['inventory'] != $order_statuses[$status_from]['inventory']) {
        if (empty($order_info['promotions'])) {
            return false;
        }
        // Post processing
        if ($order_statuses[$status_to]['inventory'] == 'D' && $order_statuses[$status_from]['inventory'] == 'I') {
            db_query("UPDATE ?:promotions SET number_of_usages = number_of_usages + 1 WHERE promotion_id IN (?n)", array_keys($order_info['promotions']));
        } else {
            db_query("UPDATE ?:promotions SET number_of_usages = number_of_usages - 1 WHERE promotion_id IN (?n)", array_keys($order_info['promotions']));
        }
        // Apply pending actions
        foreach ($order_info['promotions'] as $k => $v) {
            if (!empty($v['bonuses'])) {
                foreach ($v['bonuses'] as $bonus) {
                    // Assign usergroup
                    if ($bonus['bonus'] == 'give_usergroup') {
                        $is_ug_already_assigned = false;
                        if (empty($order_info['user_id'])) {
                            continue;
                        }
                        // Don't assing a disabled usergroup
                        $system_usergroups = fn_get_usergroups('C', CART_LANGUAGE);
                        if (!empty($system_usergroups[$bonus['value']]['status']) && $system_usergroups[$bonus['value']]['status'] == 'A') {
                            if ($order_statuses[$status_to]['inventory'] == 'D' && $order_statuses[$status_from]['inventory'] == 'I') {
                                // Don't assing the usergroup to the user if it's already assigned
                                $current_user_usergroups = fn_get_user_usergroups($order_info['user_id']);
                                foreach ($current_user_usergroups as $ug) {
                                    if (isset($ug['usergroup_id']) && $bonus['value'] == $ug['usergroup_id'] && $ug['status'] == 'A') {
                                        $is_ug_already_assigned = true;
                                        break;
                                    }
                                }
                                if (!$is_ug_already_assigned) {
                                    db_query("REPLACE INTO ?:usergroup_links SET user_id = ?i, usergroup_id = ?i, status = 'A'", $order_info['user_id'], $bonus['value']);
                                    $activated = true;
                                }
                            } else {
                                db_query("UPDATE ?:usergroup_links SET status = 'F' WHERE user_id = ?i AND usergroup_id = ?i", $order_info['user_id'], $bonus['value']);
                                $activated = false;
                            }
                            if ($notify_user == true && !$is_ug_already_assigned) {
                                Registry::get('view_mail')->assign('user_data', fn_get_user_info($order_info['user_id']));
                                Registry::get('view_mail')->assign('usergroups', fn_get_usergroups('F', $order_info['lang_code']));
                                Registry::get('view_mail')->assign('usergroup_ids', (array) $bonus['value']);
                                $prefix = $activated == true ? 'activation' : 'disactivation';
                                fn_send_mail($order_info['email'], Registry::get('settings.Company.company_users_department'), 'profiles/usergroup_' . $prefix . '_subj.tpl', 'profiles/usergroup_' . $prefix . '.tpl', array(), $order_info['lang_code']);
                            }
                        } else {
                            if (AREA == 'C') {
                                fn_set_notification('E', fn_get_lang_var('error'), fn_get_lang_var('unable_to_assign_usergroup'));
                            }
                        }
                    } elseif ($bonus['bonus'] == 'give_coupon') {
                        $promotion_data = fn_get_promotion_data($bonus['value']);
                        if (empty($promotion_data)) {
                            continue;
                        }
                        if ($order_statuses[$status_to]['inventory'] == 'D' && $order_statuses[$status_from]['inventory'] == 'I') {
                            fn_promotion_update_condition($promotion_data['conditions']['conditions'], 'add', 'auto_coupons', $bonus['coupon_code']);
                            if ($notify_user == true) {
                                Registry::get('view_mail')->assign('promotion_data', $promotion_data);
                                Registry::get('view_mail')->assign('bonus_data', $bonus);
                                Registry::get('view_mail')->assign('order_info', $order_info);
                                fn_send_mail($order_info['email'], Registry::get('settings.Company.company_users_department'), 'promotions/give_coupon_subj.tpl', 'promotions/give_coupon.tpl', array(), $order_info['lang_code']);
                            }
                        } else {
                            fn_promotion_update_condition($promotion_data['conditions']['conditions'], 'remove', 'auto_coupons', $bonus['coupon_code']);
                        }
                        db_query("UPDATE ?:promotions SET conditions = ?s, conditions_hash = ?s WHERE promotion_id = ?i", serialize($promotion_data['conditions']), fn_promotion_serialize($promotion_data['conditions']['conditions']), $bonus['value']);
                    }
                }
            }
        }
    }
    return true;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:89,代码来源:fn.promotions.php


示例15: fn_get_payment_method_data

 if (floatval($cart['total']) == 0) {
     $cart['payment_id'] = 0;
 }
 if (!empty($cart['payment_id'])) {
     $payment_info = fn_get_payment_method_data($cart['payment_id']);
     $view->assign('payment_info', $payment_info);
     $view->assign('credit_cards', fn_get_static_data_section('C', true, 'credit_card'));
 }
 $view->assign('shipping_rates', $_SESSION['shipping_rates']);
 $view->assign('payment_methods', $payment_methods = fn_prepare_checkout_payment_methods($cart, $auth));
 $cart['payment_surcharge'] = 0;
 if (!empty($cart['payment_id']) && !empty($payment_methods[$cart['payment_id']])) {
     $cart['payment_surcharge'] = $payment_methods[$cart['payment_id']]['surcharge_value'];
 }
 $view->assign('titles', fn_get_static_data_section('T'));
 $view->assign('usergroups', fn_get_usergroups('C', CART_LANGUAGE));
 $view->assign('countries', fn_get_countries(CART_LANGUAGE, true));
 $view->assign('states', fn_get_all_states());
 $cart['ship_to_another'] = fn_check_shipping_billing($cart['user_data'], $profile_fields);
 $view->assign('profile_fields', $profile_fields);
 if (Registry::get('settings.General.user_multiple_profiles') == 'Y') {
     $user_profiles = fn_get_user_profiles($auth['user_id']);
     $view->assign('user_profiles', $user_profiles);
 }
 fn_checkout_summary($cart);
 if ($edit_step == 'step_two' && !empty($completed_steps['step_one']) && empty($profile_fields['B']) && empty($profile_fields['S'])) {
     $edit_step = 'step_four';
 }
 // If we're on shipping step and shipping is not required, switch to payment step
 //FIXME
 /*if ($edit_step == 'step_three' && $cart['shipping_required'] != true) {
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:checkout.php


示例16: list

        $items_per_page = Registry::get('settings.Appearance.admin_pages_per_page');
    }
    $params['add_root'] = !empty($_REQUEST['root']) ? $_REQUEST['root'] : '';
    $params['simple'] = true;
    list($pages, $params) = fn_get_pages($params, $items_per_page);
    Registry::get('view')->assign('pages_tree', $pages);
    Registry::get('view')->assign('search', $params);
    if (empty($params['full_search'])) {
        Registry::get('view')->assign('page_types', fn_get_page_type_filter($page_type));
    } else {
        Registry::get('view')->assign('page_types', fn_get_page_object_by_type());
    }
    Registry::get('view')->assign('is_exclusive_page_type', fn_is_exclusive_page_type($page_type));
    if (!empty($_REQUEST['except_id'])) {
        Registry::get('view')->assign('except_id', $_REQUEST['except_id']);
    }
    if (fn_show_picker('pages', PAGE_THRESHOLD) == false) {
        $params = array('page_type' => fn_is_exclusive_page_type($page_type) ? $page_type : '');
        Registry::get('view')->assign('parent_pages', fn_get_pages_plain_list($params));
    }
    if ($mode == 'picker') {
        if (!empty($_REQUEST['combination_suffix'])) {
            Registry::get('view')->assign('combination_suffix', $_REQUEST['combination_suffix']);
        }
        Registry::get('view')->display('pickers/pages/picker_contents.tpl');
        exit;
    }
}
Registry::get('view')->assign('usergroups', fn_get_usergroups(array('type' => 'C', 'status' => array('A', 'H')), DESCR_SL));
/* /Preparing page data for templates and performing simple actions*/
/** /Body **/
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:31,代码来源:pages.php


示例17: fn_get_user_info

 } else {
     $user_data = fn_get_user_info($user_id, true, $profile_id);
 }
 $saved_user_data = fn_restore_post_data('user_data');
 if (!empty($saved_user_data)) {
     $user_data = fn_array_merge($user_data, $saved_user_data);
 }
 if ($mode == 'update') {
     if (empty($user_data)) {
         return array(CONTROLLER_STATUS_NO_PAGE);
     }
 }
 $user_data['user_id'] = empty($user_data['user_id']) ? !empty($user_id) ? $user_id : 0 : $user_data['user_id'];
 $user_data['user_type'] = empty($user_data['user_type']) ? 'C' : $user_data['user_type'];
 $user_type = !empty($_REQUEST['user_type']) ? $_REQUEST['user_type'] : $user_data['user_type'];
 $usergroups = fn_get_usergroups(fn_check_user_type_admin_area($user_type) ? array('status' => array('A', 'H')) : array('type' => 'C', 'status' => array('A', 'H')), CART_LANGUAGE);
 $auth['is_root'] = isset($auth['is_root']) ? $auth['is_root'] : '';
 $navigation = array('general' => array('title' => __('general'), 'js' => true), 'addons' => array('title' => __('addons'), 'js' => true));
 if (!fn_allowed_for('ULTIMATE:FREE')) {
     if ($mode == 'update' && (!fn_check_user_type_admin_area($user_type) && !Registry::get('runtime.company_id') || fn_check_user_type_admin_area($user_type) && !Registry::get('runtime.company_id') && $auth['is_root'] == 'Y' && (!empty($user_data['company_id']) || empty($user_data['company_id']) && (!empty($user_data['is_root']) && $user_data['is_root'] != 'Y')) || $user_data['user_type'] == 'V' && Registry::get('runtime.company_id') && $auth['is_root'] == 'Y' && $user_data['user_id'] != $auth['user_id'] && $user_data['company_id'] == Registry::get('runtime.company_id'))) {
         $navigation['usergroups'] = array('title' => __('usergroups'), 'js' => true);
     } else {
         $usergroups = array();
     }
 }
 if (empty($user_data['api_key'])) {
     Tygh::$app['view']->assign('new_api_key', Api::generateKey());
 }
 /**
  * Only admin can set the api key.
  */
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:profiles.php


示例18: list

        $params['paginate'] = true;
    }
    $params['add_root'] = !empty($_REQUEST['root'] 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fn_image_verification函数代码示例发布时间:2022-05-15
下一篇:
PHP fn_get_user_info函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap