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


PHP Links::load_link方法代码示例

本文整理汇总了PHP中Links::load_link方法的典型用法代码示例。如果您正苦于以下问题:PHP Links::load_link方法的具体用法?PHP Links::load_link怎么用?PHP Links::load_link使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Links的用法示例。


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

示例1: array

 function get_user_links()
 {
     $condition = array('user_id' => $this->uid, 'is_active' => 1);
     $Links = new Links();
     $category_list = $Links->load_category($condition);
     if (count($category_list) > 0) {
         $links_data_array = array();
         for ($counter = 0; $counter < count($category_list); $counter++) {
             $links_data_array[$counter]['category_id'] = $category_list[$counter]->category_id;
             $links_data_array[$counter]['category_name'] = $category_list[$counter]->category_name;
             $Links->user_id = $this->uid;
             $condition = array('category_id' => $category_list[$counter]->category_id, 'is_active' => 1);
             $links_array = $Links->load_link($condition);
             $links_data_array[$counter]['links'] = $links_array;
         }
         return $links_data_array;
     }
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:18,代码来源:MyLinksModule.php

示例2: array

     <h4><label>List name</label></h4>
     <input type="text" name="updated_category_name" class="text longer" value="' . $category[0]->category_name . '" id="updated_category_name" />
   </div>
   <div class="button_position">
     <input type="hidden" name="category_id" value="' . $category[0]->category_id . '" />
     <input type="button" name="edit_category" value="Save" class="buttonbar" onclick="javascript: list.update(true)" />
   </div>
 </fieldset>';
                             print $edit_form;
                         } else {
                             if (!empty($_GET['category_id'])) {
                                 $condition = array('category_id' => $_GET['category_id'], 'is_active' => 1);
                                 $params_array = array('user_id' => $_SESSION['user']['id']);
                                 $Links = new Links();
                                 $Links->set_params($params_array);
                                 $result_array = $Links->load_link($condition);
                                 $return_string = '';
                                 if (count($result_array) > 0) {
                                     for ($counter = 0; $counter < count($result_array); $counter++) {
                                         $return_string .= '<div class="field"><h4><label><input type="checkbox" name="link_id[]" id="link_id_' . $result_array[$counter]->link_id . '" value="' . $result_array[$counter]->link_id . '" /></label><a href="' . $result_array[$counter]->url . '" target="_blank">' . $result_array[$counter]->title . '</a></h4><span style="font-size:12px;">' . $result_array[$counter]->url . '</span></div>';
                                     }
                                     $return_string .= '<div class="button_position">
         <input type="button" name="btn_new_list"  class="buttonbar" value="Create new"  onclick="javascript: list_links.create();" />            
         <input type="button" name="btn_edit_list" value="Edit selected links"  onclick="javascript: list_links.edit();" class="buttonbar" />
         <input type="button" name="btn_delete_list" value="Delete selected links"  onclick="javascript: list_links.remove()" class="buttonbar"  />
        </div>';
                                 } else {
                                     $return_string = "<center>There are no links under this list. Click <a href=\"javascript: list_links.create();\">here</a> to add</center> ";
                                 }
                                 print $return_string;
                             }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:31,代码来源:ajax_links.php


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