本文整理汇总了PHP中article::getValue方法的典型用法代码示例。如果您正苦于以下问题:PHP article::getValue方法的具体用法?PHP article::getValue怎么用?PHP article::getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类article
的用法示例。
在下文中一共展示了article::getValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateArticle
function generateArticle($id)
{
global $PHP_SELF, $module_id, $FORM, $REX_USER, $REX, $I18N;
// --------------------------------------------------- generiere generated/articles/xx.article
$REX[RC] = true;
// Generiere Content
$CONT = new article();
$CONT->setArticleId($id);
$REX[TEMP] = $REX[BF];
$REX[BF] = false;
$article_content = "?>" . $CONT->getArticle();
$REX[BF] = true;
$article_bcontent = "?>" . $CONT->getArticle();
$REX[BF] = $REX[TEMP];
$article = "<?\r\n\r\n\$REX[ART][{$id}][name] = \"" . addslashes($CONT->getValue("name")) . "\";\r\n\$REX[ART][{$id}][beschreibung] = \"" . addslashes($CONT->getValue("beschreibung")) . "\";\r\n\$REX[ART][{$id}][suchbegriffe] = \"" . addslashes($CONT->getValue("suchbegriffe")) . "\";\r\n\$REX[ART][{$id}][category_id] = \"" . addslashes($CONT->getValue("category_id")) . "\";\r\n\$REX[ART][{$id}][article_id] = \"{$id}\";\r\n\$REX[ART][{$id}][type_id] = \"" . addslashes($CONT->getValue("type_id")) . "\";\r\n\$REX[ART][{$id}][file] = \"" . addslashes($CONT->getValue("file")) . "\";\r\n\$REX[ART][{$id}][startpage] = \"" . addslashes($CONT->getValue("startpage")) . "\";\r\n\$REX[ART][{$id}][prio] = \"" . addslashes($CONT->getValue("prio")) . "\";\r\n\$REX[ART][{$id}][path] = \"" . addslashes($CONT->getValue("path")) . "\";\r\n\$REX[ART][{$id}][online_von] = \"" . addslashes($CONT->getValue("online_von")) . "\";\r\n\$REX[ART][{$id}][online_bis] = \"" . addslashes($CONT->getValue("online_bis")) . "\";\r\n\$REX[ART][{$id}][erstelldatum] = \"" . addslashes($CONT->getValue("erstelldatum")) . "\";\r\n\$REX[ART][{$id}][template_id] = \"" . addslashes($CONT->getValue("template_id")) . "\";\r\n\$REX[ART][{$id}][status] = \"" . addslashes($CONT->getValue("status")) . "\";\r\n\r\n?>";
// Artikelparameter speichern
if ($fp = @fopen($REX[INCLUDE_PATH] . "/generated/articles/" . $id . ".article", "w")) {
fputs($fp, $article);
fclose($fp);
} 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 . ".content", "w")) {
fputs($fp, $article_content);
fclose($fp);
} else {
$MSG = $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX[INCLUDE_PATH] . "/generated/articles/";
}
// Artikel B content speichern [BARRIEREFREI]
if ($fp = @fopen($REX[INCLUDE_PATH] . "/generated/articles/" . $id . ".bcontent", "w")) {
fputs($fp, $article_bcontent);
fclose($fp);
} else {
$MSG = $I18N->msg('article_could_not_be_generated') . " " . $I18N->msg('check_rights_in_directory') . $REX[INCLUDE_PATH] . "generated/articles/";
}
if ($MSG != "") {
echo "\t<table border=0 cellpadding=5 cellspacing=1 width=770>\r\n\t\t\t<tr><td class=warning>{$MSG}</td></tr>\r\n\t\t\t</table>";
}
$REX[RC] = false;
}
示例2: rex_generateArticle
/**
* Generiert alle *.article u. *.content Dateien eines Artikels/einer Kategorie
*
* @param $id ArtikelId des Artikels, der generiert werden soll
* @param $refreshall Boolean Bei True wird der Inhalte auch komplett neu generiert, bei False nur die Metainfos
*/
function rex_generateArticle($id, $refreshall = true)
{
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
// --------------------------------------------------- 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);
// --------------------------------------------------- Artikelparameter speichern
$article = "<?php\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 ($refreshall) {
if ($fp = @fopen($REX['INCLUDE_PATH'] . "/generated/articles/{$id}.{$clang}.content", "w")) {
$article_content = "?>" . $CONT->getArticle();
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 (isset($MSG) and $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);
}
}
示例3: 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();
}