当前位置: 首页>>代码示例>>PHP>>正文


PHP osc_user_list_items_url函数代码示例

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


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

示例1: osc_pagination_items

function osc_pagination_items($extraParams = array(), $field = false)
{
    if (osc_is_public_profile()) {
        $url = osc_user_list_items_pub_profile_url('{PAGE}', $field);
        $first_url = osc_user_public_profile_url();
    } elseif (osc_is_list_items()) {
        $url = osc_user_list_items_url('{PAGE}', $field);
        $first_url = osc_user_list_items_url();
    }
    $params = array('total' => osc_search_total_pages(), 'selected' => osc_search_page(), 'url' => $url, 'first_url' => $first_url);
    if (is_array($extraParams) && !empty($extraParams)) {
        foreach ($extraParams as $key => $value) {
            $params[$key] = $value;
        }
    }
    $pagination = new Pagination($params);
    return $pagination->doPagination();
}
开发者ID:mylastof,项目名称:os-class,代码行数:18,代码来源:hPagination.php

示例2: doModel


//.........这里部分代码省略.........
                 Session::newInstance()->_dropkeepForm('meta_' . $key);
                 if ($success == 1) {
                     osc_add_flash_ok_message(_m('Check your inbox to validate your listing'));
                 } else {
                     osc_add_flash_ok_message(_m('Your listing has been published'));
                 }
                 $itemId = Params::getParam('itemId');
                 $item = $this->itemManager->findByPrimaryKey($itemId);
                 osc_run_hook('posted_item', $item);
                 $category = Category::newInstance()->findByPrimaryKey(Params::getParam('catId'));
                 View::newInstance()->_exportVariableToView('category', $category);
                 $this->redirectTo(osc_search_category_url());
             }
             break;
         case 'item_edit':
             // edit item
             $secret = Params::getParam('secret');
             $id = Params::getParam('id');
             $item = $this->itemManager->listWhere("i.pk_i_id = '%s' AND ((i.s_secret = '%s' AND i.fk_i_user_id IS NULL) OR (i.fk_i_user_id = '%d'))", addslashes($id), addslashes($secret), addslashes($this->userId));
             if (count($item) == 1) {
                 $item = Item::newInstance()->findByPrimaryKey($id);
                 $form = count(Session::newInstance()->_getForm());
                 $keepForm = count(Session::newInstance()->_getKeepForm());
                 if ($form == 0 || $form == $keepForm) {
                     Session::newInstance()->_dropKeepForm();
                 }
                 $this->_exportVariableToView('item', $item);
                 osc_run_hook("before_item_edit", $item);
                 $this->doView('item-edit.php');
             } else {
                 // add a flash message [ITEM NO EXISTE]
                 osc_add_flash_error_message(_m("Sorry, we don't have any listings with that ID"));
                 if ($this->user != null) {
                     $this->redirectTo(osc_user_list_items_url());
                 } else {
                     $this->redirectTo(osc_base_url());
                 }
             }
             break;
         case 'item_edit_post':
             // recoger el secret y el
             $secret = Params::getParam('secret');
             $id = Params::getParam('id');
             $item = $this->itemManager->listWhere("i.pk_i_id = '%s' AND ((i.s_secret = '%s' AND i.fk_i_user_id IS NULL) OR (i.fk_i_user_id = '%d'))", addslashes($id), addslashes($secret), addslashes($this->userId));
             if (count($item) == 1) {
                 $this->_exportVariableToView('item', $item[0]);
                 $mItems = new ItemActions(false);
                 // prepare data for ADD ITEM
                 $mItems->prepareData(false);
                 // set all parameters into session
                 foreach ($mItems->data as $key => $value) {
                     Session::newInstance()->_setForm($key, $value);
                 }
                 $meta = Params::getParam('meta');
                 if (is_array($meta)) {
                     foreach ($meta as $key => $value) {
                         Session::newInstance()->_setForm('meta_' . $key, $value);
                         Session::newInstance()->_keepForm('meta_' . $key);
                     }
                 }
                 if (osc_recaptcha_private_key() != '' && Params::existParam("recaptcha_challenge_field")) {
                     if (!osc_check_recaptcha()) {
                         osc_add_flash_error_message(_m('The Recaptcha code is wrong'));
                         $this->redirectTo(osc_item_edit_url());
                         return false;
                         // BREAK THE PROCESS, THE RECAPTCHA IS WRONG
开发者ID:semul,项目名称:Osclass,代码行数:67,代码来源:item.php

示例3: twitter_user_item_pagination

/**
 * Helper to use twitter pagination in user items
 */
function twitter_user_item_pagination()
{
    $params = array('total' => (int) View::newInstance()->_get('list_total_pages'), 'selected' => (int) View::newInstance()->_get('list_page'), 'class_first' => '', 'class_last' => '', 'class_prev' => 'prev', 'class_next' => 'next', 'delimiter' => '', 'text_prev' => sprintf(__('%s Previous', 'twitter'), '←'), 'text_next' => sprintf(__('Next %s', 'twitter'), '→'), 'class_selected' => 'active', 'class_non_selected' => '', 'force_limits' => false, 'url' => osc_user_list_items_url('{PAGE}'));
    $pagination = new TwitterPagination($params);
    return $pagination->doPagination();
}
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:9,代码来源:functions.php

示例4: osc_private_user_menu

/**
 * Prints the user's account menu
 *
 * @param array $options array with options of the form array('name' => 'display name', 'url' => 'url of link')
 * @return void
 */
function osc_private_user_menu($options = null)
{
    if ($options == null) {
        $options = array();
        $options[] = array('name' => __('Public Profile'), 'url' => osc_user_public_profile_url(), 'class' => 'opt_publicprofile');
        $options[] = array('name' => __('Dashboard'), 'url' => osc_user_dashboard_url(), 'class' => 'opt_dashboard');
        $options[] = array('name' => __('Manage your listings'), 'url' => osc_user_list_items_url(), 'class' => 'opt_items');
        $options[] = array('name' => __('Manage your alerts'), 'url' => osc_user_alerts_url(), 'class' => 'opt_alerts');
        $options[] = array('name' => __('My profile'), 'url' => osc_user_profile_url(), 'class' => 'opt_account');
        $options[] = array('name' => __('Logout'), 'url' => osc_user_logout_url(), 'class' => 'opt_logout');
    }
    $options = osc_apply_filter('user_menu_filter', $options);
    echo '<script type="text/javascript">';
    echo '$(".user_menu > :first-child").addClass("first");';
    echo '$(".user_menu > :last-child").addClass("last");';
    echo '</script>';
    echo '<ul class="user_menu">';
    $var_l = count($options);
    for ($var_o = 0; $var_o < $var_l - 1; $var_o++) {
        echo '<li class="' . $options[$var_o]['class'] . '" ><a href="' . $options[$var_o]['url'] . '" >' . $options[$var_o]['name'] . '</a></li>';
    }
    osc_run_hook('user_menu');
    echo '<li class="' . $options[$var_l - 1]['class'] . '" ><a href="' . $options[$var_l - 1]['url'] . '" >' . $options[$var_l - 1]['name'] . '</a></li>';
    echo '</ul>';
}
开发者ID:naneri,项目名称:Osclass,代码行数:31,代码来源:hUtils.php

示例5: pop_redirect_user_dashboard

function pop_redirect_user_dashboard()
{
    if (Rewrite::newInstance()->get_location() === 'user' && Rewrite::newInstance()->get_section() === 'dashboard') {
        header('Location: ' . osc_user_list_items_url());
        exit;
    }
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:7,代码来源:functions.php

示例6: doModel


//.........这里部分代码省略.........
                 Session::newInstance()->_dropkeepForm('meta_' . $key);
                 if ($success == 1) {
                     osc_add_flash_ok_message(_m('Check your inbox to verify your email address'));
                 } else {
                     osc_add_flash_ok_message(_m('Your item has been published'));
                 }
                 $itemId = Params::getParam('itemId');
                 $item = $this->itemManager->findByPrimaryKey($itemId);
                 osc_run_hook('posted_item', $item);
                 $category = Category::newInstance()->findByPrimaryKey(Params::getParam('catId'));
                 View::newInstance()->_exportVariableToView('category', $category);
                 $this->redirectTo(osc_search_category_url());
             }
             break;
         case 'item_edit':
             // edit item
             $secret = Params::getParam('secret');
             $id = Params::getParam('id');
             $item = $this->itemManager->listWhere("i.pk_i_id = '%s' AND ((i.s_secret = '%s' AND i.fk_i_user_id IS NULL) OR (i.fk_i_user_id = '%d'))", $id, $secret, $this->userId);
             if (count($item) == 1) {
                 $item = Item::newInstance()->findByPrimaryKey($id);
                 $form = count(Session::newInstance()->_getForm());
                 $keepForm = count(Session::newInstance()->_getKeepForm());
                 if ($form == 0 || $form == $keepForm) {
                     Session::newInstance()->_dropKeepForm();
                 }
                 $this->_exportVariableToView('item', $item);
                 osc_run_hook("before_item_edit", $item);
                 $this->doView('item-edit.php');
             } else {
                 // add a flash message [ITEM NO EXISTE]
                 osc_add_flash_error_message(_m('Sorry, we don\'t have any items with that ID'));
                 if ($this->user != null) {
                     $this->redirectTo(osc_user_list_items_url());
                 } else {
                     $this->redirectTo(osc_base_url());
                 }
             }
             break;
         case 'item_edit_post':
             // recoger el secret y el
             $secret = Params::getParam('secret');
             $id = Params::getParam('id');
             $item = $this->itemManager->listWhere("i.pk_i_id = '%s' AND ((i.s_secret = '%s' AND i.fk_i_user_id IS NULL) OR (i.fk_i_user_id = '%d'))", $id, $secret, $this->userId);
             if (count($item) == 1) {
                 $this->_exportVariableToView('item', $item[0]);
                 $mItems = new ItemActions(false);
                 // prepare data for ADD ITEM
                 $mItems->prepareData(false);
                 // set all parameters into session
                 foreach ($mItems->data as $key => $value) {
                     Session::newInstance()->_setForm($key, $value);
                 }
                 $meta = Params::getParam('meta');
                 if (is_array($meta)) {
                     foreach ($meta as $key => $value) {
                         Session::newInstance()->_setForm('meta_' . $key, $value);
                         Session::newInstance()->_keepForm('meta_' . $key);
                     }
                 }
                 if (osc_recaptcha_private_key() != '' && Params::existParam("recaptcha_challenge_field")) {
                     if (!osc_check_recaptcha()) {
                         osc_add_flash_error_message(_m('The Recaptcha code is wrong'));
                         $this->redirectTo(osc_item_post_url());
                         return false;
                         // BREAK THE PROCESS, THE RECAPTCHA IS WRONG
开发者ID:nsswaga,项目名称:OSClass,代码行数:67,代码来源:item.php

示例7: printf

                                        <?php 
        }
        ?>
                                    </p>
                                    <br />
                            </div>
                    <?php 
    }
    ?>
                    <br />
                    <div class="paginate" >
                    <?php 
    for ($i = 0; $i < osc_list_total_pages(); $i++) {
        if ($i == osc_list_page()) {
            printf('<a class="searchPaginationSelected" href="%s">%d</a>', osc_user_list_items_url($i), $i + 1);
        } else {
            printf('<a class="searchPaginationNonSelected" href="%s">%d</a>', osc_user_list_items_url($i), $i + 1);
        }
    }
    ?>
                    </div>
                <?php 
}
?>
            </div>
        </div>
        <?php 
osc_current_web_theme_path('footer.php');
?>
    </body>
</html>
开发者ID:randomecho,项目名称:OSClass,代码行数:31,代码来源:user-items.php

示例8: doModel


//.........这里部分代码省略.........
         case 'item_edit':
             $secret = Params::getParam('secret');
             $id = Params::getParam('id');
             $item = $this->itemManager->listWhere("i.pk_i_id = '%s' AND ((i.s_secret = '%s' AND i.fk_i_user_id IS NULL) OR (i.fk_i_user_id = '%d'))", $id, $secret, $this->userId);
             if (count($item) == 1) {
                 $item = Item::newInstance()->findByPrimaryKey($id);
                 $categories = Category::newInstance()->toTree();
                 $countries = Country::newInstance()->listAll();
                 $regions = array();
                 if (isset($this->user['fk_c_country_code']) && $this->user['fk_c_country_code'] != '') {
                     $regions = Region::newInstance()->getByCountry($this->user['fk_c_country_code']);
                 } else {
                     if (count($countries) > 0) {
                         $regions = Region::newInstance()->getByCountry($countries[0]['pk_c_code']);
                     }
                 }
                 $cities = array();
                 if (isset($this->user['fk_i_region_id']) && $this->user['fk_i_region_id'] != '') {
                     $cities = City::newInstance()->listWhere("fk_i_region_id = %d", $this->user['fk_i_region_id']);
                 } else {
                     if (count($regions) > 0) {
                         $cities = City::newInstance()->listWhere("fk_i_region_id = %d", $regions[0]['pk_i_id']);
                     }
                 }
                 $currencies = Currency::newInstance()->listAll();
                 $this->_exportVariableToView('item', $item);
                 //$this->_exportVariableToView('user', $this->user) ;
                 $this->doView('item-edit.php');
             } else {
                 // add a flash message [ITEM NO EXISTE]
                 //$this->redirectTo(osc_base_url(true));
                 osc_add_flash_message(_m('Sorry, we don\'t have any items with that ID'));
                 if ($this->user != null) {
                     $this->redirectTo(osc_user_list_items_url());
                 } else {
                     $this->redirectTo(osc_base_url());
                 }
             }
             break;
         case 'item_edit_post':
             // recoger el secret y el
             $secret = Params::getParam('secret');
             $id = Params::getParam('id');
             $item = $this->itemManager->listWhere("i.pk_i_id = '%s' AND ((i.s_secret = '%s' AND i.fk_i_user_id IS NULL) OR (i.fk_i_user_id = '%d'))", $id, $secret, $this->userId);
             if (count($item) == 1) {
                 $this->_exportVariableToView('item', $item[0]);
                 $mItems = new ItemActions(false);
                 $success = $mItems->edit();
                 if ($success) {
                     osc_add_flash_message(_m('Great! We\'ve just updated your item'));
                     $this->redirectTo(osc_base_url(true) . "?page=item&id={$id}");
                 } else {
                     $this->redirectTo(osc_item_edit_url($secret));
                 }
             }
             break;
         case 'activate':
             $secret = Params::getParam('secret');
             $id = Params::getParam('id');
             $item = $this->itemManager->listWhere("i.pk_i_id = '%s' AND ((i.s_secret = '%s' AND i.fk_i_user_id IS NULL) OR (i.fk_i_user_id = '%d'))", $id, $secret, $this->userId);
             View::newInstance()->_exportVariableToView('item', $item[0]);
             if ($item[0]['e_status'] == 'INACTIVE') {
                 // ACTIVETE ITEM
                 $mItems = new ItemActions(false);
                 $success = $mItems->activate($item[0]['pk_i_id'], $item[0]['s_secret']);
                 if ($success) {
开发者ID:hashemgamal,项目名称:OSClass,代码行数:67,代码来源:item.php

示例9: osc_user_list_items_url

    ?>
                        </span>
                    </div>
                	<div class="togglebutton <?php 
    echo $buttonClass;
    ?>
 pull-right">
                       <a href="<?php 
    echo osc_user_list_items_url();
    ?>
?ShowAs=list" class="list-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><i class="fa fa-th-list"></i> <?php 
    _e('List', 'flatter');
    ?>
</a>
                       <a href="<?php 
    echo osc_user_list_items_url();
    ?>
?ShowAs=gallery" class="grid-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><i class="fa fa-th"></i> <?php 
    _e('Grid', 'flatter');
    ?>
</a>
                  	</div><!-- Togglebutton -->
                </div>
                <?php 
}
?>
                
                <?php 
if (osc_count_items() == 0) {
    ?>
                <div id="content">
开发者ID:abhi143u11,项目名称:ads,代码行数:31,代码来源:user-items.php

示例10: get_menu_options

function get_menu_options()
{
    $options = array();
    $options[] = array('name' => __('Public Profile'), 'url' => osc_user_public_profile_url(osc_logged_user_id()), 'class' => 'opt_publicprofile');
    $options[] = array('name' => __('Dashboard'), 'url' => osc_user_dashboard_url(), 'class' => 'opt_dashboard');
    $options[] = array('name' => __('Manage your listings'), 'url' => osc_user_list_items_url(), 'class' => 'opt_items');
    $options[] = array('name' => __('Manage your alerts'), 'url' => osc_user_alerts_url(), 'class' => 'opt_alerts');
    $options[] = array('name' => __('My profile'), 'url' => osc_user_profile_url(), 'class' => 'opt_account');
    $options[] = array('name' => __('Logout'), 'url' => osc_user_logout_url(), 'class' => 'opt_logout');
    return $options;
}
开发者ID:Ashishr2,项目名称:Kathmandu,代码行数:11,代码来源:functions.php

示例11: get_user_menu

 function get_user_menu()
 {
     $options = array();
     /*$options[] = array(
           'name' => __('Public Profile'),
            'url' => osc_user_public_profile_url(),
          'class' => 'opt_publicprofile'
       );*/
     $options[] = array('name' => __('Account', 'flatter'), 'url' => osc_user_profile_url(), 'class' => 'opt_account');
     $options[] = array('name' => __('Listings', 'flatter'), 'url' => osc_user_list_items_url(), 'class' => 'opt_items');
     $options[] = array('name' => __('Alerts', 'flatter'), 'url' => osc_user_alerts_url(), 'class' => 'opt_alerts');
     /*$options[] = array(
           'name'  => __('Change email', 'flatter'),
           'url'   => osc_change_user_email_url(),
           'class' => 'opt_change_email'
       );
       $options[] = array(
           'name'  => __('Change username', 'flatter'),
           'url'   => osc_change_user_username_url(),
           'class' => 'opt_change_username'
       );
       $options[] = array(
           'name'  => __('Change password', 'flatter'),
           'url'   => osc_change_user_password_url(),
           'class' => 'opt_change_password'
       );*/
     $options[] = array('name' => __('Logout', 'flatter'), 'url' => osc_user_logout_url());
     return $options;
 }
开发者ID:abhi143u11,项目名称:ads,代码行数:29,代码来源:functions.php

示例12: header

            header('Location: ' . $_SERVER['HTTP_REFERER']);
            //  header("Location: " . osc_base_url(true) . '?page=item&id=' . $id);
            exit;
            //else statement if the number of republish times has been reached
        } else {
            // add a flash message [ITEM NO EXISTE]
            osc_add_flash_error_message(__('Sorry, this ad has reached the max number of republishes.', 'adManage'));
            $conn->osc_dbExec("INSERT %st_item_adManage_log (fk_i_item_id, log_date, error_action) VALUES ('%d', '%s', '%s')", DB_TABLE_PREFIX, $id, date('Y-m-d H:i:s'), 'Item reached max num of republishes. ' . date('Y-m-d H:i:s'));
            if (osc_is_web_user_logged_in()) {
                // REDIRECT
                header("Location: " . osc_user_list_items_url());
            } else {
                // REDIRECT
                header("Location: " . osc_base_url(true));
            }
        }
    } else {
        // add a flash message [ITEM NO EXISTE]
        osc_add_flash_error_message(__('Sorry, we don\'t have any items with that ID or the secret key is incorrect.', 'adManage'));
        $conn->osc_dbExec("INSERT %st_item_adManage_log (fk_i_item_id, log_date, error_action) VALUES ('%d', '%s', '%s')", DB_TABLE_PREFIX, $id, date('Y-m-d H:i:s'), 'Item does not exist or incorrect secret key. ' . date('Y-m-d H:i:s'));
        if (osc_is_web_user_logged_in()) {
            // REDIRECT
            header("Location: " . osc_user_list_items_url());
        } else {
            // REDIRECT
            header("Location: " . osc_base_url(true));
        }
    }
} else {
    $conn->osc_dbExec("INSERT %st_item_adManage_log (fk_i_item_id, log_date, error_action) VALUES ('%d', '%s', '%s')", DB_TABLE_PREFIX, $id, date('Y-m-d H:i:s'), 'Problem with url no action taken. ' . date('Y-m-d H:i:s'));
}
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:item_republish.php


注:本文中的osc_user_list_items_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。