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


PHP post_url函数代码示例

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


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

示例1: next

 /**
  * {@inheritdoc}
  */
 public function next()
 {
     if (!$this->post->type->hierarchical && $this->post->older) {
         return post_url($this->post->older, true);
     }
     return null;
 }
开发者ID:hrslash,项目名称:luminous,代码行数:10,代码来源:PostQuery.php

示例2: imageIntercept

/**
 * 图片截取
 */
function imageIntercept($param)
{
    //图片目录
    if (in_array($_SERVER['HTTP_HOST'], array("imglocal.boqii.com", "imglocal.boqiicdn.com"))) {
        $dirName = 'D:/Project/www/svnimg/Data/Vet/C';
        $imgdir = 'http://imglocal.boqii.com';
        $imgcdndir = "http://imglocal.boqiicdn.com/";
    } elseif (in_array($_SERVER['HTTP_HOST'], array('imgtest.boqii.com', 'imgtest.boqiicdn.com'))) {
        $dirName = '/webwww/img/Data/Vet/C';
        $imgdir = 'http://imgtest.boqii.com';
        $imgcdndir = "http://imgtest.boqiicdn.com/";
    } elseif (in_array($_SERVER['HTTP_HOST'], array("img1.boqii.com", "img1.boqiicdn.com"))) {
        $dirName = '/webwww1/img1/Data/Vet/C';
        $imgdir = 'http://img1.boqii.com';
        $imgcdndir = "http://img1.boqiicdn.com/";
    } elseif (in_array($_SERVER['HTTP_HOST'], array("img.boqii.com", "img.boqiicdn.com"))) {
        $dirName = '/webwww/img/Data/Vet/C';
        $imgdir = 'http://img.boqii.com';
        $imgcdndir = "http://img.boqiicdn.com/";
    } elseif (in_array($_SERVER['HTTP_HOST'], array("img.boqii.com", "img3.boqiicdn.com"))) {
        $dirName = '/webwww/img/Data/Vet/C';
        $imgdir = 'http://img3.boqii.com';
        $imgcdndir = "http://img3.boqiicdn.com/";
    }
    $post_data = array('twidth' => $param['twidth'], 'theight' => $param['theight'], 'picurl' => $param['picurl'], 'tpicurl' => $param['tpicurl'], 'tpath' => str_replace($imgcdndir, '', $param['tpicurl']), 'type' => 1, 'subtype' => $param['type'], 'aucode' => 'boqii', 'method' => 'mbprase');
    $url = $imgdir . "/Server/upload.php";
    $result = post_url($url, $post_data);
    return $result;
}
开发者ID:commiunty,项目名称:Mytest,代码行数:32,代码来源:mbimage.php

示例3: handle_pubsubhubbub

function handle_pubsubhubbub()
{
    global $a, $db;
    logger('start');
    // We'll push to each subscriber that has push > 0,
    // i.e. there has been an update (set in notifier.php).
    $r = q("SELECT * FROM `push_subscriber` WHERE `push` > 0");
    foreach ($r as $rr) {
        $params = get_feed_for($a, '', $rr['nickname'], $rr['last_update'], 0, true);
        $hmac_sig = hash_hmac("sha1", $params, $rr['secret']);
        $headers = array("Content-type: application/atom+xml", sprintf("Link: <%s>;rel=hub," . "<%s>;rel=self", $a->get_baseurl() . '/pubsubhubbub', $rr['topic']), "X-Hub-Signature: sha1=" . $hmac_sig);
        logger('POST ' . print_r($headers, true) . "\n" . $params, LOGGER_DEBUG);
        post_url($rr['callback_url'], $params, $headers);
        $ret = $a->get_curl_code();
        if ($ret >= 200 && $ret <= 299) {
            logger('successfully pushed to ' . $rr['callback_url']);
            // set last_update to "now", and reset push=0
            $date_now = datetime_convert('UTC', 'UTC', 'now', 'Y-m-d H:i:s');
            q("UPDATE `push_subscriber` SET `push` = 0, last_update = '%s' WHERE id = %d", dbesc($date_now), intval($rr['id']));
        } else {
            logger('error when pushing to ' . $rr['callback_url'] . ' HTTP: ' . $ret);
            // we use the push variable also as a counter, if we failed we
            // increment this until some upper limit where we give up
            $new_push = intval($rr['push']) + 1;
            if ($new_push > 30) {
                // OK, let's give up
                $new_push = 0;
            }
            q("UPDATE `push_subscriber` SET `push` = %d WHERE id = %d", $new_push, intval($rr['id']));
        }
    }
    logger('done');
}
开发者ID:ZerGabriel,项目名称:friendica,代码行数:33,代码来源:pubsubpublish.php

示例4: match_content

/**
 * @brief Controller for /match.
 *
 * It takes keywords from your profile and queries the directory server for
 * matching keywords from other profiles.
 *
 * @param App &$a
 * @return void|string
 */
function match_content(&$a)
{
    $o = '';
    if (!local_user()) {
        return;
    }
    $a->page['aside'] .= findpeople_widget();
    $a->page['aside'] .= follow_widget();
    $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
    $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", intval(local_user()));
    if (!count($r)) {
        return;
    }
    if (!$r[0]['pub_keywords'] && !$r[0]['prv_keywords']) {
        notice(t('No keywords to match. Please add keywords to your default profile.') . EOL);
        return;
    }
    $params = array();
    $tags = trim($r[0]['pub_keywords'] . ' ' . $r[0]['prv_keywords']);
    if ($tags) {
        $params['s'] = $tags;
        if ($a->pager['page'] != 1) {
            $params['p'] = $a->pager['page'];
        }
        if (strlen(get_config('system', 'directory'))) {
            $x = post_url(get_server() . '/msearch', $params);
        } else {
            $x = post_url($a->get_baseurl() . '/msearch', $params);
        }
        $j = json_decode($x);
        if ($j->total) {
            $a->set_pager_total($j->total);
            $a->set_pager_itemspage($j->items_page);
        }
        if (count($j->results)) {
            $id = 0;
            foreach ($j->results as $jj) {
                $match_nurl = normalise_link($jj->url);
                $match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1", intval(local_user()), dbesc($match_nurl));
                if (!count($match)) {
                    $jj->photo = str_replace("http:///photo/", get_server() . "/photo/", $jj->photo);
                    $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
                    $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
                    $photo_menu[] = array(t("Connect/Follow"), $connlnk);
                    $contact_details = get_contact_details_by_url($jj->url, local_user());
                    $entry = array('url' => zrl($jj->url), 'itemurl' => $contact_details['addr'] != "" ? $contact_details['addr'] : $jj->url, 'name' => $jj->name, 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], 'account_type' => $contact_details['community'] ? t('Forum') : '', 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), 'inttxt' => ' ' . t('is interested in:'), 'conntxt' => t('Connect'), 'connlnk' => $connlnk, 'img_hover' => $jj->tags, 'photo_menu' => $photo_menu, 'id' => ++$id);
                    $entries[] = $entry;
                }
            }
            $tpl = get_markup_template('viewcontact_template.tpl');
            $o .= replace_macros($tpl, array('$title' => t('Profile Match'), '$contacts' => $entries, '$paginate' => paginate($a)));
        } else {
            info(t('No matches') . EOL);
        }
    }
    return $o;
}
开发者ID:vinzv,项目名称:friendica,代码行数:66,代码来源:match.php

示例5: mainMessage

 private function mainMessage()
 {
     $user = $this->userText();
     $url = post_url($this->post->topic_id, $this->post->post_id);
     $title = $this->topic->topic_title;
     $command = $this->replyCommand();
     $prefix = $this->prefix;
     return "{$prefix}: <{$url}|{$title}> by {$user} `{$command}`";
 }
开发者ID:ppy,项目名称:osu-web,代码行数:9,代码来源:NotifySlack.php

示例6: match_content

function match_content(&$a)
{
    $o = '';
    if (!local_user()) {
        return;
    }
    $a->page['aside'] .= follow_widget();
    $a->page['aside'] .= findpeople_widget();
    $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
    $o .= replace_macros(get_markup_template("section_title.tpl"), array('$title' => t('Profile Match')));
    $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", intval(local_user()));
    if (!count($r)) {
        return;
    }
    if (!$r[0]['pub_keywords'] && !$r[0]['prv_keywords']) {
        notice(t('No keywords to match. Please add keywords to your default profile.') . EOL);
        return;
    }
    $params = array();
    $tags = trim($r[0]['pub_keywords'] . ' ' . $r[0]['prv_keywords']);
    if ($tags) {
        $params['s'] = $tags;
        if ($a->pager['page'] != 1) {
            $params['p'] = $a->pager['page'];
        }
        if (strlen(get_config('system', 'directory'))) {
            $x = post_url(get_server() . '/msearch', $params);
        } else {
            $x = post_url($a->get_baseurl() . '/msearch', $params);
        }
        $j = json_decode($x);
        if ($j->total) {
            $a->set_pager_total($j->total);
            $a->set_pager_itemspage($j->items_page);
        }
        if (count($j->results)) {
            $tpl = get_markup_template('match.tpl');
            foreach ($j->results as $jj) {
                $match_nurl = normalise_link($jj->url);
                $match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1", intval(local_user()), dbesc($match_nurl));
                if (!count($match)) {
                    $jj->photo = str_replace("http:///photo/", get_server() . "/photo/", $jj->photo);
                    $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
                    $o .= replace_macros($tpl, array('$url' => zrl($jj->url), '$name' => $jj->name, '$photo' => proxy_url($jj->photo), '$inttxt' => ' ' . t('is interested in:'), '$conntxt' => t('Connect'), '$connlnk' => $connlnk, '$tags' => $jj->tags));
                }
            }
        } else {
            info(t('No matches') . EOL);
        }
    }
    $o .= cleardiv();
    $o .= paginate($a);
    return $o;
}
开发者ID:ZerGabriel,项目名称:friendica,代码行数:54,代码来源:match.php

示例7: imagePrase

/**
 * 缩略图处理
 *
 * @param path string 文件路径
 * @param filename string 文件名
 * @param uid int 用户ID(如果图片目录不需要用用户id三级扩展则传0)
 * @param subtype string 子模块类型
 * 
 */
function imagePrase($path, $filename, $uid, $subtype)
{
    global $img_dir;
    //需要上传的文件
    $post_data = array('id' => $uid, 'type' => 1, 'aucode' => "boqii", 'subtype' => $subtype, 'method' => 'prase', 'path' => $path, 'filename' => $filename);
    $url = $img_dir . "/Server/upload.php";
    $result = post_url($url, $post_data);
    if ($result && strpos($result, '{') === false) {
        $json = array('status' => 'error', 'tip' => '处理失败!');
    } else {
        $json = json_decode($result, true);
    }
    return json_encode($json);
}
开发者ID:commiunty,项目名称:Mytest,代码行数:23,代码来源:image.php

示例8: index

 /**
  * 관리자 메인 페이지입니다
  */
 public function index()
 {
     // 이벤트 라이브러리를 로딩합니다
     $eventname = 'event_admin_main_index';
     $this->load->event($eventname);
     $view = array();
     $view['view'] = array();
     // 이벤트가 존재하면 실행합니다
     $view['view']['event']['before'] = Events::trigger('before', $eventname);
     $view['view']['latest_member'] = $this->Member_model->get_admin_list(7, '', '', '', 'mem_id', 'desc', '', '');
     if (isset($view['view']['latest_member']['list']) && is_array($view['view']['latest_member']['list'])) {
         foreach ($view['view']['latest_member']['list'] as $key => $val) {
             $view['view']['latest_member']['list'][$key]['display_name'] = display_username(element('mem_userid', $val), element('mem_nickname', $val));
         }
     }
     $view['view']['latest_point'] = $this->Point_model->get_admin_list(7, '', '', '', 'poi_id', 'desc', '', '');
     if (isset($view['view']['latest_point']['list']) && is_array($view['view']['latest_point']['list'])) {
         foreach ($view['view']['latest_point']['list'] as $key => $val) {
             $view['view']['latest_point']['list'][$key]['display_name'] = display_username(element('mem_userid', $val), element('mem_nickname', $val));
         }
     }
     $view['view']['latest_post'] = $this->Post_model->get_admin_list(7, '', '', '', 'post_id', 'desc', '', '');
     if (isset($view['view']['latest_post']['list']) && is_array($view['view']['latest_post']['list'])) {
         foreach ($view['view']['latest_post']['list'] as $key => $val) {
             $brd_key = $this->board->item_id('brd_key', element('brd_id', $val));
             $view['view']['latest_post']['list'][$key]['post_url'] = post_url($brd_key, element('post_id', $val));
             $view['view']['latest_post']['list'][$key]['display_name'] = display_username(element('post_userid', $val), element('post_nickname', $val));
         }
     }
     $view['view']['latest_comment'] = $this->Comment_model->get_admin_list(7, '', '', '', 'cmt_id', 'desc', '', '');
     if (isset($view['view']['latest_comment']['list']) && is_array($view['view']['latest_comment']['list'])) {
         foreach ($view['view']['latest_comment']['list'] as $key => $val) {
             $post = $this->Post_model->get_one(element('post_id', $val), 'brd_id');
             $brd_key = $this->board->item_id('brd_key', element('brd_id', $post));
             $view['view']['latest_comment']['list'][$key]['post_url'] = post_url($brd_key, element('post_id', $val)) . '#comment_' . element('cmt_id', $val);
             $view['view']['latest_comment']['list'][$key]['display_name'] = display_username(element('cmt_userid', $val), element('cmt_nickname', $val));
         }
     }
     // 이벤트가 존재하면 실행합니다
     $view['view']['event']['before_layout'] = Events::trigger('before_layout', $eventname);
     /**
      * 어드민 레이아웃을 정의합니다
      */
     $layoutconfig = array('layout' => 'layout', 'skin' => 'main');
     $view['layout'] = $this->managelayout->admin($layoutconfig, $this->cbconfig->get_device_view_type());
     $this->data = $view;
     $this->layout = element('layout_skin_file', element('layout', $view));
     $this->view = element('view_skin_file', element('layout', $view));
 }
开发者ID:smboy86,项目名称:zzing,代码行数:52,代码来源:Main.php

示例9: match_content

function match_content(&$a)
{
    $o = '';
    if (!local_user()) {
        return;
    }
    $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
    $o .= '<h2>' . t('Profile Match') . '</h2>';
    $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", intval(local_user()));
    if (!count($r)) {
        return;
    }
    if (!$r[0]['pub_keywords'] && !$r[0]['prv_keywords']) {
        notice(t('No keywords to match. Please add keywords to your default profile.') . EOL);
        return;
    }
    $params = array();
    $tags = trim($r[0]['pub_keywords'] . ' ' . $r[0]['prv_keywords']);
    if ($tags) {
        $params['s'] = $tags;
        if ($a->pager['page'] != 1) {
            $params['p'] = $a->pager['page'];
        }
        if (strlen(get_config('system', 'directory_submit_url'))) {
            $x = post_url('http://dir.friendica.com/msearch', $params);
        } else {
            $x = post_url($a->get_baseurl() . '/msearch', $params);
        }
        $j = json_decode($x);
        if ($j->total) {
            $a->set_pager_total($j->total);
            $a->set_pager_itemspage($j->items_page);
        }
        if (count($j->results)) {
            $tpl = get_markup_template('match.tpl');
            foreach ($j->results as $jj) {
                $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
                $o .= replace_macros($tpl, array('$url' => zrl($jj->url), '$name' => $jj->name, '$photo' => $jj->photo, '$inttxt' => ' ' . t('is interested in:'), '$conntxt' => t('Connect'), '$connlnk' => $connlnk, '$tags' => $jj->tags));
            }
        } else {
            info(t('No matches') . EOL);
        }
    }
    $o .= cleardiv();
    $o .= paginate($a);
    return $o;
}
开发者ID:jzacman,项目名称:friendica,代码行数:47,代码来源:match.php

示例10: imageIntercept

 /**
  * 图片截取
  * @param $imgh 	原始图片的高
  * @param $imgw 	原始图片的宽
  * @param $nowh 	截取之后图片的高
  * @param $noww 	截取之后图片的宽
  * @param $ph 		截图高度为ph
  * @param $picurl 	图片地址picurl
  * @param $pw 		截图宽度为pw
  * @param $px 		截图X坐标为px
  * @param $py 		截图Y坐标为py
  * @param $type 	图片的类型 
  */
 public function imageIntercept($param)
 {
     $post_data = array('imgh' => $param['imgh'], 'imgw' => $param['imgw'], 'nowh' => $param['nowh'], 'noww' => $param['noww'], 'ph' => $param['ph'], 'picurl' => $param['picurl'], 'pw' => $param['pw'], 'px' => $param['px'], 'py' => $param['py'], 'type' => 1, 'subtype' => $param['type'], 'aucode' => 'boqii', 'method' => 'imagickIntercept');
     //服务器地址
     if (in_array($_SERVER['HTTP_HOST'], array("mycmslocal.jason.com"))) {
         $url = "http://mycmslocal.jason.com/Addons/img/Server/upload.php";
     } elseif (in_array($_SERVER['HTTP_HOST'], array('www.jinx888.com'))) {
         $url = "http://www.jinx888.com/Addons/img/Server/upload.php";
     }
     $result = post_url($url, $post_data);
     if ($result && strpos($result, '{') === false) {
         $json = array('status' => 'error', 'tip' => '截图失败!');
     } else {
         $json = json_decode($result, true);
     }
     return json_encode($json);
 }
开发者ID:commiunty,项目名称:Mytest,代码行数:30,代码来源:ImageAction.class.php

示例11: post_by_cat_links

function post_by_cat_links($posts, $cat, $website_url_array)
{
    $item_counter = 0;
    $string = '<ul>';
    foreach ($posts as $post) {
        if (strcasecmp(trim($post->category_name), $cat) == 0 && strcasecmp(trim($post->post_type), "primary_page") != 0 && in_array($post->post_slug, $website_url_array) != 1) {
            $url = post_url($post);
            $string .= '<li>';
            $string .= '<h4>' . anchor($url, e($post->post_title)) . '</h4>';
            $string .= '</li>';
            $item_counter++;
        }
    }
    if ($item_counter < 1) {
        $string .= '<li>';
        $string .= '<h4><a href="#">There are no ' . $cat . '</a></h4>';
        $string .= '</li>';
    }
    $string .= '</ul>';
    return $string;
}
开发者ID:codza,项目名称:panga,代码行数:21,代码来源:template_helper.php

示例12: watermark

/**
 * 图片截取
 */
function watermark($param)
{
    //图片目录
    if (in_array($_SERVER['HTTP_HOST'], array("imglocal.boqii.com", "imglocal.boqiicdn.com"))) {
        $imgdir = 'http://imglocal.boqii.com';
        $imgcdndir = "http://imglocal.boqiicdn.com/";
    } elseif (in_array($_SERVER['HTTP_HOST'], array('imgtest.boqii.com', 'imgtest.boqiicdn.com'))) {
        $imgdir = 'http://imgtest.boqii.com';
        $imgcdndir = "http://imgtest.boqiicdn.com/";
    } elseif (in_array($_SERVER['HTTP_HOST'], array("img1.boqii.com", "img1.boqiicdn.com"))) {
        $imgdir = 'http://img1.boqii.com';
        $imgcdndir = "http://img1.boqiicdn.com/";
    } elseif (in_array($_SERVER['HTTP_HOST'], array("img.boqii.com", "img.boqiicdn.com"))) {
        $imgdir = 'http://img.boqii.com';
        $imgcdndir = "http://img.boqiicdn.com/";
    } elseif (in_array($_SERVER['HTTP_HOST'], array("img3.boqii.com", "img3.boqiicdn.com"))) {
        $imgdir = 'http://img3.boqii.com';
        $imgcdndir = "http://img3.boqiicdn.com/";
    }
    $post_data = array('picurl' => $param['picurl'], 'type' => 1, 'subtype' => $param['type'], 'aucode' => 'boqii', 'method' => 'watermark');
    $url = $imgdir . "/Server/upload.php";
    $result = json_decode(post_url($url, $post_data), true);
    return $result;
}
开发者ID:commiunty,项目名称:Mytest,代码行数:27,代码来源:watermark.php

示例13: post_url

*/
function post_url($url, $post_data, $time = 30)
{
    $time = $time <= 30 ? $time : 30;
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($ch, CURLOPT_TIMEOUT, $time);
    $output = curl_exec($ch);
    curl_close($ch);
    return $output;
}
$_FILE = $_FILES['upfile']["tmp_name"];
$post_data = array('id' => 755739, 'type' => 1, 'aucode' => "boqii", 'subtype' => 'weibo', 'upfile' => "@" . $_FILE);
$url = "http://imga.boqii.com/Server/upload.php";
print_r(json_decode(post_url($url, $post_data), true));
?>
<html>
<body>

<form action="client.php" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="upfile" id="upfile" /> 
<br />
<input type="submit" name="submit" value="Submit" />
</form>

</body>
</html>
开发者ID:commiunty,项目名称:Mytest,代码行数:31,代码来源:client.php

示例14: index

 /**
  * 목록을 가져오는 메소드입니다
  */
 public function index()
 {
     // 이벤트 라이브러리를 로딩합니다
     $eventname = 'event_admin_board_fileupload_index';
     $this->load->event($eventname);
     $view = array();
     $view['view'] = array();
     // 이벤트가 존재하면 실행합니다
     $view['view']['event']['before'] = Events::trigger('before', $eventname);
     /**
      * 페이지에 숫자가 아닌 문자가 입력되거나 1보다 작은 숫자가 입력되면 에러 페이지를 보여줍니다.
      */
     $param =& $this->querystring;
     $page = (int) $this->input->get('page') > 0 ? (int) $this->input->get('page') : 1;
     $view['view']['sort'] = array('pfi_id' => $param->sort('pfi_id', 'asc'), 'pfi_filesize' => $param->sort('pfi_filesize', 'asc'), 'pfi_download' => $param->sort('pfi_download', 'asc'), 'pfi_datetime' => $param->sort('pfi_datetime', 'asc'));
     $findex = $this->input->get('findex') ? $this->input->get('findex') : $this->{$this->modelname}->primary_key;
     $forder = $this->input->get('forder', null, 'desc');
     $sfield = $this->input->get('sfield', null, '');
     $skeyword = $this->input->get('skeyword', null, '');
     $per_page = admin_listnum();
     $offset = ($page - 1) * $per_page;
     /**
      * 게시판 목록에 필요한 정보를 가져옵니다.
      */
     $this->{$this->modelname}->allow_search_field = array('pfi_id', 'post.post_id', 'post.mem_id', 'pfi_originname', 'pfi_filename', 'pfi_datetime', 'pfi_ip');
     // 검색이 가능한 필드
     $this->{$this->modelname}->search_field_equal = array('pfi_id', 'post.post_id', 'post.mem_id');
     // 검색중 like 가 아닌 = 검색을 하는 필드
     $this->{$this->modelname}->allow_order_field = array('pfi_id', 'pfi_filesize', 'pfi_download', 'pfi_datetime');
     // 정렬이 가능한 필드
     $where = array();
     if ($brdid = (int) $this->input->get('brd_id')) {
         $where['post.brd_id'] = $brdid;
     }
     $result = $this->{$this->modelname}->get_admin_list($per_page, $offset, $where, '', $findex, $forder, $sfield, $skeyword);
     $list_num = $result['total_rows'] - ($page - 1) * $per_page;
     if (element('list', $result)) {
         foreach (element('list', $result) as $key => $val) {
             $result['list'][$key]['post_display_name'] = display_username(element('post_userid', $val), element('post_nickname', $val));
             $brd_key = $this->board->item_id('brd_key', element('brd_id', $val));
             $result['list'][$key]['posturl'] = post_url($brd_key, element('post_id', $val));
             $result['list'][$key]['download_link'] = admin_url($this->pagedir . '/download/' . element('pfi_id', $val));
             if (element('pfi_is_image', $val)) {
                 $result['list'][$key]['origin_image_url'] = thumb_url('post', element('pfi_filename', $val));
                 $result['list'][$key]['thumb_url'] = thumb_url('post', element('pfi_filename', $val), '80');
             }
             $result['list'][$key]['board'] = $board = $this->board->item_all(element('brd_id', $val));
             if ($board) {
                 $result['list'][$key]['baordurl'] = board_url(element('brd_key', $board));
             }
             $result['list'][$key]['num'] = $list_num--;
         }
     }
     $view['view']['data'] = $result;
     $view['view']['boardlist'] = $this->Board_model->get_board_list();
     /**
      * primary key 정보를 저장합니다
      */
     $view['view']['primary_key'] = $this->{$this->modelname}->primary_key;
     /**
      * 페이지네이션을 생성합니다
      */
     $config['base_url'] = admin_url($this->pagedir) . '?' . $param->replace('page');
     $config['total_rows'] = $result['total_rows'];
     $config['per_page'] = $per_page;
     $this->pagination->initialize($config);
     $view['view']['paging'] = $this->pagination->create_links();
     $view['view']['page'] = $page;
     /**
      * 쓰기 주소, 삭제 주소등 필요한 주소를 구합니다
      */
     $search_option = array('pfi_originname' => '파일명', 'pfi_datetime' => '올린날짜', 'pfi_ip' => 'IP');
     $view['view']['skeyword'] = $sfield && array_key_exists($sfield, $search_option) ? $skeyword : '';
     $view['view']['search_option'] = search_option($search_option, $sfield);
     $view['view']['listall_url'] = admin_url($this->pagedir);
     $view['view']['list_delete_url'] = admin_url($this->pagedir . '/listdelete/?' . $param->output());
     // 이벤트가 존재하면 실행합니다
     $view['view']['event']['before_layout'] = Events::trigger('before_layout', $eventname);
     /**
      * 어드민 레이아웃을 정의합니다
      */
     $layoutconfig = array('layout' => 'layout', 'skin' => 'index');
     $view['layout'] = $this->managelayout->admin($layoutconfig, $this->cbconfig->get_device_view_type());
     $this->data = $view;
     $this->layout = element('layout_skin_file', element('layout', $view));
     $this->view = element('view_skin_file', element('layout', $view));
 }
开发者ID:smboy86,项目名称:zzing,代码行数:90,代码来源:Fileupload.php

示例15: lang

<ul selected="true">
    <li class="group"><?php 
echo lang('archives');
?>
</li>
    	<?php 
foreach ($posts as $post) {
    ?>
	        <li>
	        <a href="<?php 
    echo post_url($post['url_title'], $post['date_posted']);
    ?>
"><?php 
    echo $post['title'];
    ?>
</a>
	        </li>
		<?php 
}
?>
</ul>
	
开发者ID:hasanmoha,项目名称:Open-Blog,代码行数:21,代码来源:archive.php


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