コード例 #1
0
ファイル: vote_question.class.php プロジェクト: h3len/Project
 /**
  *
  * 获取引用素材的索引图 标题 引用 栏目
  * @param int $option_id
  */
 public function get_quote($rids)
 {
     if (!$rids) {
         return false;
     }
     require_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $pub = new publishcontent();
     $pubs = new publishcontent();
     $ret = $pub->get_content_by_rids($rids);
     $return = $pubs->get_pub_content_type();
     if (!$ret) {
         return false;
     }
     if (is_array($return)) {
         foreach ($return as $k => $v) {
             $bundles[$v['bundle']] = $v['name'];
         }
     }
     if (is_array($ret)) {
         foreach ($ret as $k => $v) {
             $quote[$v['rid']] = array('id' => $v['rid'], 'title' => $v['title'], 'brief' => $v['brief'], 'bundle_id' => $v['bundle_id'], 'module_id' => $v['module_id'], 'content_url' => $v['content_url'], 'content_fromid' => $v['content_fromid'], 'img_info' => hg_material_link($v['indexpic']['host'], $v['indexpic']['dir'], $v['indexpic']['filepath'], $v['indexpic']['filename']), 'pic_arr' => $v['indexpic'], 'upload_type' => '引用', 'module_name' => $bundles[$v['bundle_id']]);
         }
     }
     return $quote;
 }