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

PHP article类代码示例

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

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



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

示例1: module_sheet

function module_sheet()
{
    global $global, $smarty;
    $cat = get_global('cat');
    $page = get_global('page');
    $prefix = 'data/mod-sheet';
    if ($cat) {
        $prefix = $prefix . '/cat-' . $cat;
    }
    $url = S_SERVER_URL . '?/data/cat-' . $cat . '/page-' . $page . '/index.html';
    $str = file_get_contents($url);
    $result = json_decode(rawurldecode($str), true);
    if (is_array($result)) {
        $server_cat_list = $result['cat_list'];
        $sheet = $result['sheet'];
        for ($i = 0; $i < count($sheet); $i++) {
            $obj = new article();
            $obj->set_where("art_title = '" . $sheet[$i]['art_title'] . "'");
            if ($obj->get_count()) {
                $sheet[$i]['is_exist'] = 1;
            } else {
                $sheet[$i]['is_exist'] = 0;
            }
        }
        $smarty->assign('page_sum', $result['page_sum']);
        $smarty->assign('prefix', $prefix);
    } else {
        $server_cat_list = array();
        $sheet = array();
    }
    $smarty->assign('article', $sheet);
    $cat_list = get_local_cat();
    if (count($cat_list) < count($server_cat_list)) {
        for ($i = 0; $i < count($server_cat_list); $i++) {
            $flag = false;
            for ($j = 0; $j < count($cat_list); $j++) {
                if ($server_cat_list[$i]['cat_id'] == $cat_list[$j]['server_id']) {
                    $flag = true;
                    if ($server_cat_list[$i]['cat_name'] != $cat_list[$j]['server_name']) {
                        $val = $server_cat_list[$i]['cat_id'] . '|' . $server_cat_list[$i]['cat_name'] . '|' . $cat_list[$i]['channel_id'] . '|' . $cat_list[$i]['cat_id'];
                        $obj = new varia();
                        $obj->set_value('var_value', $val);
                        $obj->set_where('var_id = ' . $cat_list[$i]['varia_id']);
                        $obj->edit();
                    }
                    break;
                }
            }
            if (!$flag) {
                $val = $server_cat_list[$i]['cat_id'] . '|' . $server_cat_list[$i]['cat_name'] . '|0|0';
                $obj = new varia();
                $obj->set_value('var_name', 'data_cat');
                $obj->set_value('var_value', $val);
                $obj->add();
            }
        }
        $cat_list = get_local_cat();
    }
    $smarty->assign('cat_list', $cat_list);
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:60,代码来源:sheet.php


示例2: rex_generateArticle

function rex_generateArticle($id, $refresh = 0)
{
    global $PHP_SELF, $module_id, $FORM, $REX_USER, $REX, $I18N;
    // artikel generieren
    // vorraussetzung: articel steht schon in der datenbank
    //
    // -> infos schreiben -> abhaengig von clang
    // --> artikel infos / einzelartikel metadaten
    // --> artikel content / einzelartikel content
    // --> listen generieren // wenn startpage = 1
    // ---> artikel liste
    // ---> category liste
    // --> cache loeschen
    // --------------------------------------------------- generiere generated/articles/xx.article
    $CL = $REX[CLANG];
    reset($CL);
    for ($i = 0; $i < count($CL); $i++) {
        $clang = key($CL);
        $REX[RC] = true;
        // keine Ausgabe als eval(CONTENT) sondern nur speichern in datei
        $CONT = new article();
        $CONT->setCLang($clang);
        $CONT->setArticleId($id);
        $article_content = "?>" . $CONT->getArticle();
        // --------------------------------------------------- Artikelparameter speichern
        $article = "<?\n" . "\n\$REX[ART][{$id}][article_id][{$clang}] = \"{$id}\";" . "\n\$REX[ART][{$id}][re_id][{$clang}] = \"" . rex_addslashes($CONT->getValue("re_id")) . "\";" . "\n\$REX[ART][{$id}][name][{$clang}] = \"" . rex_addslashes($CONT->getValue("name")) . "\";" . "\n\$REX[ART][{$id}][catname][{$clang}] = \"" . rex_addslashes($CONT->getValue("catname")) . "\";" . "\n\$REX[ART][{$id}][cattype][{$clang}] = \"" . rex_addslashes($CONT->getValue("name")) . "\";" . "\n\$REX[ART][{$id}][alias][{$clang}] = \"" . rex_addslashes($CONT->getValue("name")) . "\";" . "\n\$REX[ART][{$id}][description][{$clang}] = \"" . rex_addslashes($CONT->getValue("description")) . "\";" . "\n\$REX[ART][{$id}][attribute][{$clang}] = \"" . rex_addslashes($CONT->getValue("attribute")) . "\";" . "\n\$REX[ART][{$id}][file][{$clang}] = \"" . rex_addslashes($CONT->getValue("file")) . "\";" . "\n\$REX[ART][{$id}][type_id][{$clang}] = \"" . rex_addslashes($CONT->getValue("type_id")) . "\";" . "\n\$REX[ART][{$id}][teaser][{$clang}] = \"" . rex_addslashes($CONT->getValue("teaser")) . "\";" . "\n\$REX[ART][{$id}][startpage][{$clang}] = \"" . rex_addslashes($CONT->getValue("startpage")) . "\";" . "\n\$REX[ART][{$id}][prior][{$clang}] = \"" . rex_addslashes($CONT->getValue("prior")) . "\";" . "\n\$REX[ART][{$id}][path][{$clang}] = \"" . rex_addslashes($CONT->getValue("path")) . "\";" . "\n\$REX[ART][{$id}][status][{$clang}] = \"" . rex_addslashes($CONT->getValue("status")) . "\";" . "\n\$REX[ART][{$id}][online_from][{$clang}] = \"" . rex_addslashes($CONT->getValue("online_from")) . "\";" . "\n\$REX[ART][{$id}][online_to][{$clang}] = \"" . rex_addslashes($CONT->getValue("online_to")) . "\";" . "\n\$REX[ART][{$id}][createdate][{$clang}] = \"" . rex_addslashes($CONT->getValue("createdate")) . "\";" . "\n\$REX[ART][{$id}][updatedate][{$clang}] = \"" . rex_addslashes($CONT->getValue("updatedate")) . "\";" . "\n\$REX[ART][{$id}][keywords][{$clang}] = \"" . rex_addslashes($CONT->getValue("keywords")) . "\";" . "\n\$REX[ART][{$id}][template_id][{$clang}] = \"" . rex_addslashes($CONT->getValue("template_id")) . "\";" . "\n\$REX[ART][{$id}][createuser][{$clang}] = \"" . rex_addslashes($CONT->getValue("createuser")) . "\";" . "\n\$REX[ART][{$id}][updateuser][{$clang}] = \"" . rex_addslashes($CONT->getValue("updateuser")) . "\";" . "\n\$REX[ART][{$id}][last_update_stamp][{$clang}] = \"" . time() . "\";" . "\n?>";
        if ($fp = @fopen($REX[INCLUDE_PATH] . "/generated/articles/{$id}.{$clang}.article", "w")) {
            fputs($fp, $article);
            fclose($fp);
            @chmod($REX[INCLUDE_PATH] . "/generated/articles/{$id}.{$clang}.article", 0777);
        } else {
            $MSG = $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX[INCLUDE_PATH] . "/generated/articles/";
        }
        // --------------------------------------------------- Artikelcontent speichern
        if ($fp = @fopen($REX[INCLUDE_PATH] . "/generated/articles/{$id}.{$clang}.content", "w")) {
            fputs($fp, $article_content);
            fclose($fp);
            @chmod($REX[INCLUDE_PATH] . "/generated/articles/{$id}.{$clang}.content", 0777);
        } else {
            $MSG = $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX[INCLUDE_PATH] . "/generated/articles/";
        }
        if ($MSG != "") {
            echo "<table border=0 cellpadding=5 cellspacing=1 width=770><tr><td class=warning>{$MSG}</td></tr></table>";
        }
        $REX[RC] = false;
        // --------------------------------------------------- Listen generieren
        if ($CONT->getValue("startpage") == 1) {
            rex_generateLists($id);
            rex_generateLists($CONT->getValue("re_id"));
        } else {
            rex_generateLists($CONT->getValue("re_id"));
        }
        next($CL);
    }
    // --------------------------------------------------- recache all
    $Cache = new Cache();
    $Cache->removeAllCacheFiles();
}
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:58,代码来源:function_rex_generate.inc.php


示例3: get_champs

 public function get_champs()
 {
     $obj_article = new article("champ");
     $obj_article->fields = "id,titre,filtre1";
     $result = $obj_article->query();
     foreach ($result as $row) {
         $this->list_champs[$row["id"]] = $row["titre"];
         if ($row["filtre1"] == "1") {
             $this->list_champ_crypte[] = $row["id"];
         }
     }
 }
开发者ID:wedesign-pf,项目名称:code-g,代码行数:12,代码来源:controller.php


示例4: req_article

 public function req_article($name)
 {
     $obj_article = new article($name);
     $obj_article->fields = "id,titre";
     $obj_article->orderby = "titre ASC";
     if (isset($this->id)) {
         $obj_article->where = "id=" . $this->id;
     } else {
         $obj_article->limit = "1";
     }
     $this->result = $obj_article->query();
 }
开发者ID:wedesign-pf,项目名称:code-g,代码行数:12,代码来源:AppController.php


示例5: module_new_article

function module_new_article()
{
    global $smarty;
    $obj = new article();
    $obj->set_field('art_id,art_channel_id,art_title,art_add_time');
    $obj->set_page_size(10);
    $list = $obj->get_list();
    for ($i = 0; $i < count($list); $i++) {
        $list[$i]['channel'] = get_data('channel', $list[$i]['art_channel_id'], 'cha_code');
        $list[$i]['short_title'] = cut_str($list[$i]['art_title'], 16);
    }
    $smarty->assign('new_article', $list);
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:13,代码来源:new_article.php


示例6: module_tailor_sheet

function module_tailor_sheet()
{
    global $global, $smarty;
    $obj = new varia();
    $obj->set_where("var_name = 'tailor_data_cat'");
    $list = $obj->get_list();
    if (count($list)) {
        for ($i = 0; $i < count($list); $i++) {
            $arr = explode('|', $list[$i]['var_value']);
            $cat_list[$i]['server_id'] = $arr[0];
            $cat_list[$i]['server_name'] = $arr[1];
        }
    } else {
        $cat_list = array();
    }
    $smarty->assign('cat_list', $cat_list);
    $data_username = rawurlencode(get_varia('data_username'));
    $data_password = rawurlencode(get_varia('data_password'));
    $cat = get_global('cat');
    $page = get_global('page');
    $prefix = 'data/mod-tailor_sheet';
    $page_sum = 1;
    $sheet = array();
    if ($cat) {
        $prefix = $prefix . '/cat-' . $cat;
    }
    $url = S_SERVER_URL . 'tailor.php?/tailor/cat-' . $cat . '/page-' . $page . '/data_username-' . $data_username . '/data_password-' . $data_password . '/index.html';
    $str = file_get_contents($url);
    $result = json_decode(rawurldecode($str), true);
    if (is_array($result)) {
        if ($result['error'] == 'no') {
            $sheet = $result['sheet'];
            for ($i = 0; $i < count($sheet); $i++) {
                $obj = new article();
                $obj->set_where("art_title = '" . $sheet[$i]['art_title'] . "'");
                if ($obj->get_count()) {
                    $sheet[$i]['is_exist'] = 1;
                } else {
                    $sheet[$i]['is_exist'] = 0;
                }
            }
            $page_sum = $result['page_sum'];
        }
    }
    $smarty->assign('page_sum', $page_sum);
    $smarty->assign('prefix', $prefix);
    $smarty->assign('article', $sheet);
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:48,代码来源:tailor_sheet.php


示例7: actionSystemmain

 /**
  * 后台主页信息
  */
 public function actionSystemmain()
 {
     $SYS = array('PHP版本:' => $_SERVER['SERVER_SOFTWARE'], '当前系统类型:' => php_uname('s'), 'PHP运行方式:' => php_sapi_name(), '服务器域名:' => $_SERVER['SERVER_NAME'], '服务器端口:' => $_SERVER['SERVER_PORT'], '北京时间:' => date('Y年m月d日 H:i:s', time()));
     $count = array('会员总数:' => Account::model()->count('id!=:ID', array(':ID' => 0)), '文章总数:' => article::model()->count('id!=:ID', array(':ID' => 0)), '评论总数:' => Comments::model()->count('id!=:ID', array(':ID' => 0)));
     $Role = Role::model()->find('id=:ID', array(':ID' => Yii::app()->session['USER_ACCOUNT']['roleId']));
     $basic = array('权限级别:' => $Role->name);
     $this->render('Systemmain', array('SYS' => $SYS, 'Info' => $count, 'basic' => $basic));
 }
开发者ID:xuyi5918,项目名称:ipensoft,代码行数:11,代码来源:SystemController.php


示例8: getTexte

function getTexte($id)
{
    global $thisSite;
    //  $mySelect = new mySelect(__FILE__);
    //	$mySelect->tables=$thisSite->PREFIXE_TBL_GEN . "textes";
    //	$mySelect->fields="texte";
    //	$mySelect->where="id=:id AND lg=:lg";
    //	$mySelect->whereValue["id"]=array($id,PDO::PARAM_STR);
    //	$mySelect->whereValue["lg"]=array($thisSite->current_lang,PDO::PARAM_STR);
    //	$result=$mySelect->query();
    //	$row = current($result);
    //	return stripslashes($row["texte"]);
    $obj_article = new article("textes");
    $obj_article->where = "id=" . $id . "  AND lg='" . $thisSite->current_lang . "'";
    $result = $obj_article->query();
    $row = current($result);
    return $row;
}
开发者ID:wedesign-pf,项目名称:Tit,代码行数:18,代码来源:fonctions_data.php


示例9: module_edit

function module_edit()
{
    global $global, $smarty;
    $obj = new article();
    $obj->set_where('art_id = ' . $global['id']);
    $one = $obj->get_one();
    $smarty->assign('article', $one);
    $smarty->assign('editor_text', $one['art_text']);
    $list = array();
    $obj = new cat_art();
    $obj->set_where('cat_channel_id = ' . $global['channel_id']);
    $arr = $obj->get_list();
    if (count($arr) > 0) {
        $list = $obj->set_cat_order($arr);
    }
    $smarty->assign('cat_list', $list);
    $smarty->assign('upl_date', date('Ymd'));
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:18,代码来源:edit.php


示例10: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $article = article::findorfail($id);
     $tags = $article->gettags;
     $tagName = null;
     foreach ($tags as $tag) {
         $tagName .= $tag->name . ',';
     }
     return view('articles.edit', compact('article', 'tagName'));
 }
开发者ID:borghan,项目名称:Laravel_Blog,代码行数:16,代码来源:ArticleController.php


示例11: checkEditPermissions

 /**
  * Führt Prüfung durch, ob Artikel bearbeitet werden kann
  * @param \fpcm\model\articles\article $article
  * @return boolean
  */
 public function checkEditPermissions(article &$article)
 {
     if ($this->permissions === false) {
         return true;
     }
     $isAdmin = \fpcm\classes\baseconfig::$fpcmSession->getCurrentUser()->isAdmin();
     $permEditAll = $this->permissions->check(array('article' => 'editall'));
     $permEditOwn = $this->permissions->check(array('article' => 'edit'));
     if ($isAdmin || $permEditAll) {
         $article->setEditPermission(true);
         return true;
     }
     if (!$isAdmin && !$permEditAll && $permEditOwn && $article->getCreateuser() == \fpcm\classes\baseconfig::$fpcmSession->getUserId()) {
         $article->setEditPermission(true);
         return true;
     }
     $article->setEditPermission(false);
     return true;
 }
开发者ID:sea75300,项目名称:fanpresscm3,代码行数:24,代码来源:permissions.php


示例12: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(User $user)
 {
     $article = article::with('ArticleCategories')->where('user_id', $user->id)->get();
     $checkArticle = $article->isEmpty();
     //dd($article);
     if (\Auth::check()) {
         $url = str_contains($this->checkloginpage($user->name), \Auth::user()->name);
     } else {
         $url = false;
     }
     return view('userArticle.index', compact('user', 'article', 'url', 'checkArticle'));
 }
开发者ID:novanabs,项目名称:portofolio-apps,代码行数:17,代码来源:userArticleController.php


示例13: module_article_list

function module_article_list()
{
    global $smarty;
    $obj = new cat_art();
    $obj->set_where('cat_best = 1');
    $best_cat = $obj->get_list();
    $art_list = array();
    if (count($best_cat) > 0) {
        $smarty->assign('show_all_art', 0);
        $list_len = get_varia('index_art_list_len');
        for ($i = 0; $i < count($best_cat); $i++) {
            $cat_id = $best_cat[$i]['cat_id'];
            $best_cat[$i]['channel'] = get_data('channel', $best_cat[$i]['cat_channel_id'], 'cha_code');
            $family = implode(',', get_cat_family('cat_art', $cat_id));
            $obj = new article();
            $obj->set_field('art_id,art_title,art_add_time');
            $obj->set_where("art_cat_id in ({$family})");
            $obj->set_page_size($list_len ? $list_len : 5);
            $list = $obj->get_list();
            for ($j = 0; $j < count($list); $j++) {
                $list[$j]['short_title'] = cut_str($list[$j]['art_title'], 22);
            }
            $art_list[$cat_id] = $list;
            unset($obj);
        }
        $smarty->assign('best_art_cat', $best_cat);
        $smarty->assign('art_list', $art_list);
    } else {
        $smarty->assign('show_all_art', 1);
    }
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:31,代码来源:article_list.php


示例14: module_search_main

function module_search_main()
{
    global $global, $smarty;
    $global['key'] = url_decode($global['key']);
    $list_len = get_varia('art_list_len');
    $obj = new article();
    $obj->set_field('art_id,art_channel_id,art_title,art_add_time');
    $obj->set_where("art_title like '%" . $global['key'] . "%'");
    $obj->set_page_size($list_len ? $list_len : 20);
    $obj->set_page_num($global['page']);
    $sheet = $obj->get_sheet();
    for ($i = 0; $i < count($sheet); $i++) {
        $sheet[$i]['channel'] = get_data('channel', $sheet[$i]['art_channel_id'], 'cha_code');
        $sheet[$i]['short_title'] = cut_str($sheet[$i]['art_title'], 42);
    }
    set_link($obj->get_page_sum());
    $smarty->assign('search', $sheet);
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:18,代码来源:search_main.php


示例15: addPage

 function addPage()
 {
     system::setParam("page", "addPage");
     article::getAllCats();
     $fill = array();
     $doRedirect = false;
     if (!empty($_POST["slug"])) {
         $fill["slug"] = core::generateSlug($_POST["slug"]);
     } else {
         if (!empty($_POST["title"])) {
             $fill["slug"] = core::generateSlug($_POST["title"]);
         }
     }
     $fill += $_POST;
     if (isset($_POST["picRealUpload"])) {
         $uploadedPics = blog::uploadOnePicture($fill["slug"]);
     }
     $fill["poster"] = "";
     if (isset($_FILES["poster"]) && $_FILES["poster"]["error"] == 0) {
         $uploadedPics = blog::uploadOnePicture($fill["slug"], "articleImages");
         if (isset($uploadedPics["poster"]) && $uploadedPics["poster"]) {
             $fill["poster"] = serialize($uploadedPics["poster"]);
         }
     }
     if (isset($_POST["savePost"])) {
         $savedPost = blog::writePost($fill, "article");
         if ($savedPost) {
             $doRedirect = true;
         }
     }
     blog::showAttachedPics($fill);
     $this->smarty->assign("fill", $fill);
     if ($doRedirect) {
         system::redirect(system::param("urlBase") . "listPage");
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:36,代码来源:index.php


示例16: date

 * 负责处理新发表文章的逻辑
 * Createed By C860 at 2014-1-19
 */
if (!class_exists('sys')) {
    include_once '../conf/config.php';
}
//需要登录
sys::needLog('../login.php');
//检测数据合法性
if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['content']) && !empty($_POST['content']) && isset($_POST['tags']) && !empty($_POST['tags'])) {
    //引入相关模型类
    include_once '../Models/article.php';
    include_once '../Models/tag_relate_article.php';
    include_once '../Models/user_info.php';
    $currentTime = date('Y-m-d H:i:s');
    //新增文章
    if (article::add($_POST['title'], $_POST['content'], $currentTime, $_SESSION['userId'])) {
        $ID = article::getId($_POST['title'], $_SESSION['userId'], $currentTime);
        $tags = explode('|', $_POST['tags']);
        foreach ($tags as $tag) {
            tag_relate_article::add($tag, $ID);
        }
        user_info::increaseArticleCount($_SESSION['userId']);
        sys::alert('发表成功!');
        sys::redirect('../index.php');
    }
} else {
    //引入相关模型类
    include_once 'Models/tag.php';
    $taglist = tag::getAllTags();
}
开发者ID:dalinhuang,项目名称:HCI-MSGsystem,代码行数:31,代码来源:newArticle.php


示例17: basename

if (isset($_POST["visibilite"])) {
    $visibilite = true;
} else {
    $visibilite = false;
}
if (isset($_FILES["file"])) {
    // Traitement des données
    // spécifier le chemin vers le répertoir des images
    $dossier = '../../../images/';
    // permet de récupérer le nom du fichier
    $fichier = basename($_FILES['file']['name']);
    // permet de récuperer l'extension du fichier et le transformer en minuscule
    $extension = strtolower(pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION));
    if ($extension == "jpg" || $extension == "png" || $extension == "gif") {
        if (move_uploaded_file($_FILES['file']['tmp_name'], $dossier . md5($fichier) . "." . $extension)) {
            $imageUploaded = md5($fichier) . "." . $extension;
            echo 'Upload effectué avec succès !';
        } else {
            echo 'Echec de l\'upload !';
        }
    } else {
        echo "Erreur extention";
    }
}
$article = new article($titre, $date, $categorie, $_GET['id'], $contenu, $visibilite, $imageUploaded);
$resultat = $article->savearticle();
if ($resultat == true) {
    echo "<br/>Article crée avec succès";
} else {
    echo "<br/>Echec de création";
}
开发者ID:hamzauser,项目名称:projetweb,代码行数:31,代码来源:actionajouter.php


示例18: unserialize

if (isset($_POST['id'])) {
    $article = $db->selectObject('article', 'id=' . $_POST['id']);
    if ($article != null) {
        $loc = unserialize($article->location_data);
    }
} else {
    $article->rank = $db->max('article', 'rank', 'location_data', "location_data='" . serialize($loc) . "'");
    if ($article->rank == null) {
        $article->rank = 0;
    } else {
        $article->rank += 1;
    }
}
if (pathos_permissions_check("manage", $loc)) {
    $oldcatid = $article->category_id;
    $article = article::update($_POST, $article);
    $article->location_data = serialize($loc);
    if (isset($_POST['categories'])) {
        $article->category_id = $_POST['categories'];
    }
    if (isset($article->id)) {
        $article->id = $db->updateObject($article, "article");
    } else {
        $article->id = $db->insertObject($article, "article");
    }
    articlemodule::spiderContent($article);
    if ($oldcatid != $article->category_id) {
        $db->decrement('article', 'rank', 1, "location_data='" . serialize($loc) . "' AND rank > " . $article->rank . " AND category_id=" . $article->category_id);
    }
    pathos_flow_redirect();
} else {
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:save_article.php


示例19: actionAddarc

 /**
  *  添加文章
  */
 public function actionAddarc()
 {
     if ($_POST) {
         $article = new article();
         $article->title = $_POST['titles'];
         $article->article = $_POST['Html'];
         $article->cataId = $_POST['cata'];
         $article->remark = substr(strip_tags($_POST['info']), 0, 150);
         $article->time = date('Y-m-d H:i:s', time());
         $article->creater = Yii::app()->session['USER_ACCOUNT']['id'];
         $article->save(false);
         if ($AID = $article->attributes['id']) {
             foreach ($_POST['Tags'] as $key => $value) {
                 CActiveRecord::$db->createCommand()->insert('tagsasarticle', array('articleId' => $AID, 'tagsId' => $value, 'time' => date('Y-m-d H:i:s', time())));
             }
             exit('文章发表成功!');
         }
     }
     /**
      * 查询出分类列表
      */
     $Sql = 'SELECT * FROM `catalog`';
     $QueryRow = CActiveRecord::$db->createCommand($Sql)->queryAll();
     $QueryRow = $this->SelectdOrder($QueryRow, 0, 0);
     $this->ArrayToObject($QueryRow);
     /**
      * 查询出tags标签信息
      */
     $Sql = 'Select * from `tags` limit 0,8';
     $Tags = CACtiveRecord::$db->createCommand($Sql)->queryAll();
     $this->ArrayToObject($Tags);
     $this->render('insert', array('SelectAll' => $QueryRow, 'tagsbox' => $Tags));
 }
开发者ID:xuyi5918,项目名称:ipensoft,代码行数:36,代码来源:MainController.php


示例20: article

// Sollte immer false bleiben
$REX['REDAXO'] = false;
// Wenn $REX[GG] = true; dann wird der
// Content aus den redaxo/include/generated/
// genommen
$REX['GG'] = true;
// setzte pfad und includiere klassen und funktionen
$REX['HTDOCS_PATH'] = "./";
include "./redaxo/include/master.inc.php";
// Starte einen neuen Artikel und setzte die aktuelle
// artikel id. wenn nicht vorhanden, nimm einen
// speziellen artikel. z.b. fehler seite oder home seite
if (!isset($article_id) or $article_id == '') {
    $article_id = $REX['START_ARTICLE_ID'];
}
$REX_ARTICLE = new article();
$REX_ARTICLE->setCLang($clang);
if ($REX_ARTICLE->setArticleId($article_id)) {
    echo $REX_ARTICLE->getArticleTemplate();
} elseif ($REX_ARTICLE->setArticleId($REX['NOTFOUND_ARTICLE_ID'])) {
    echo $REX_ARTICLE->getArticleTemplate();
} else {
    echo 'Kein Startartikel selektiert / No starting Article selected. Please click here to enter <a href="redaxo/index.php">redaxo</a>';
    $REX['STATS'] = 0;
}
// ----- caching end für output filter
$CONTENT = ob_get_contents();
ob_end_clean();
// ----- EXTENSION POINT
$CONTENT = rex_register_extension_point('OUTPUT_FILTER', $CONTENT);
// ----- EXTENSION POINT - keine Manipulation der Ausgaben ab hier (read only)
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:index.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP articulo类代码示例发布时间:2022-05-23
下一篇:
PHP arr类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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