Toplam Üye:
32638
Aktif Üye:
0
Aktif Ziyaretçi:
949
ME_Haber 2.3 ..(108223 okuma, 145 yanıt) Resim Galerisi Modülü 2.0 ..(121168 okuma, 173 yanıt) Ustalardan Bir Ricam Olac ..(13551 okuma, 6 yanıt) nukecode.com will close ..(11140 okuma, 5 yanıt) super youtube player a lo ..(6317 okuma, 1 yanıt) Need good PHP Haber port ..(5581 okuma, 0 yanıt) Forum Nasil Tam Sayfa Olu ..(34925 okuma, 40 yanıt) Php nuke Forumu Düzenleme ..(9889 okuma, 6 yanıt) Yeni Üyelik Aktivasyon Li ..(10942 okuma, 6 yanıt) Aşk Flashları Modülü ..(6948 okuma, 2 yanıt) resim galeri 2.0 da kateg ..(11360 okuma, 9 yanıt) Yeni iki modul: Merhumlar ..(32212 okuma, 36 yanıt) ürün tanıtım modülü ..(25170 okuma, 23 yanıt) PHP Nuke is out ..(14897 okuma, 13 yanıt) MSN Video Bing Video oldu ..(5177 okuma, 0 yanıt) haberhit.com ..(5768 okuma, 1 yanıt) Bilgi Yarışması 1.0 tama ..(51637 okuma, 72 yanıt) Musıc Box elinde olan var ..(6655 okuma, 2 yanıt) Online Okey , Batak , Tav ..(172427 okuma, 340 yanıt) Emlak Modül ve Blockları ..(12225 okuma, 8 yanıt) WM who ist shampions ..(5021 okuma, 1 yanıt) coppermine resim galerisi ..(5464 okuma, 1 yanıt) Forumda Teşekkür Eklentis ..(9022 okuma, 7 yanıt) free wordpress themes ..(5552 okuma, 1 yanıt) JW image rotator for nsn ..(7615 okuma, 4 yanıt) need Iletisim module ..(10959 okuma, 8 yanıt) Yeni modul: İletişim modu ..(27549 okuma, 33 yanıt) Başvuru Modulu ve Etkinli ..(5799 okuma, 1 yanıt) world cup flash ..(5020 okuma, 0 yanıt) ..:: Php Nuke FTP link Ha ..(4923 okuma, 0 yanıt) yeni phpnuke youtube 2.0 ..(5148 okuma, 1 yanıt) Content Plus Önceki Konu ..(4749 okuma, 0 yanıt) Php nuke Tickets Modülü ..(7943 okuma, 5 yanıt) need help to news time ..(4524 okuma, 0 yanıt) NSN News v3.0 new plugin ..(4813 okuma, 0 yanıt) how to save flash as imag ..(6017 okuma, 2 yanıt) Video Blok Yardım Lütfen. ..(5955 okuma, 2 yanıt) gazete ara ..(9737 okuma, 5 yanıt) Bizim Yazarlar ve Bizim Ş ..(14866 okuma, 14 yanıt) Nuke Reflections v2 Türkç ..(14484 okuma, 14 yanıt) CNB Your Account 750 442 ..(14171 okuma, 13 yanıt) Admin panelindeki simge ç ..(12288 okuma, 9 yanıt) Hosting Modülü ..(13954 okuma, 13 yanıt) Bizim şairler Modülü ..(5160 okuma, 1 yanıt) new plugin for nsn news v ..(4740 okuma, 1 yanıt) php nuke 8.0 türkce dil s ..(6884 okuma, 3 yanıt) Kan Bankası Modül istek ..(6114 okuma, 2 yanıt) Haber Konulari Sayfasinda ..(5724 okuma, 2 yanıt) Kan Bankası Modülünde İsi ..(7022 okuma, 3 yanıt) sonhaberler flash block ..(6593 okuma, 4 yanıt)
Netopsiyon Online: Forums
Netopsiyon Online :: Başlık görüntüleniyor - FCK Editör contet modülüne uyarlama?
Önceki başlık :: Sonraki başlık
Yazar
Mesaj
maviay_67 Mesaj: 500+
Kayıt: Jan 01, 2005 Mesajlar: 580 Konum: istanbul
Tarih: 2008-02-19, 14:21:06 Mesaj konusu: FCK Editör contet modülüne uyarlama?
arkadaşlar fck editör contet modülüne nasıl uygulayabiliriz baya bir araştırmama ragmen diger siteler olsun birşey anlayamadım bu konuda bilgisi olan yardımcı olabilirmi?
Başa dön
Bu Site Google Adsense ile Gelir Elde Ediyor
Tarih: 2024-05-03, 15:18:46 Mesaj konusu: Forum Arası Reklamlar
Başa dön
sadakatli Mesaj: 200+
Kayıt: Mar 13, 2007 Mesajlar: 244
Tarih: 2009-06-02, 13:16:31 Mesaj konusu:
bu sorun günceldir.
Başa dön
Gkhnd Mesaj: 300+
Kayıt: May 17, 2005 Mesajlar: 349 Konum: Php-Nuke - Forever Drupal
Başa dön
rache Mesaj: 100+
Kayıt: Sep 30, 2007 Mesajlar: 108 Konum: Avusturya
Tarih: 2009-06-02, 19:35:27 Mesaj konusu:
Kisa bir zaman önce bende cok ugrastim FckEditör'ü kurmaya..Simdi bütün sitede kullaniyorum ; Köse Yazilari-Siir-Content-News-Admin message.php vesaire..Gayet kullanisli ve cok ise yariyor....
Asagidaki kodlar modules/Content/admin/index.php dosyasininn kodlaridir.....bu kodlari sendeki index.php icindekilerle degis calisacaktir FckEditör.... Bu islemi yapmadan önce. asagidaki index.php basinda, asagidaki gibi editörün yolunu belirten satir var, onu kendine göre ayarla......FCK-Editör'ü modul olarak kullaniyorsan degismene gerek yok, oldugu gibi kalsin.Bende bu sekilde yani modul olarak kullaniyorum editörü.
//include Editor Start
include("modules/FCKeditor/fckeditor.php");
// include Editor Ende
modules/Content/admin/index.php
Kod:
<?php
global $prefix, $db, $admin_file;
if (!eregi("".$admin_file.".php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='Content'"));
$row2 = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i=0; $i < sizeof($admins); $i++) {
if ($row2['name'] == "$admins[$i]" AND $row['admins'] != "") {
$auth_user = 1;
}
}
if ($row2['radminsuper'] == 1 || $auth_user == 1) {
// include Editor Start
include("modules/FCKeditor/fckeditor.php");
// include Editor Ende
/*********************************************************/
/* Sections Manager Functions */
/*********************************************************/
function content() {
global $prefix, $db, $language, $multilingual, $bgcolor2, $admin_file, $copy;
include("header.php");
GraphicAdmin();
title("" . _CONTENTMANAGER . "");
OpenTable();
echo "<table border=\"0\" width=\"100%\"><tr>"
."<td bgcolor=\"$bgcolor2\"><b>" . _TITLE . "</b></td><td align=\"center\" bgcolor=\"$bgcolor2\"><b>" . _CURRENTSTATUS . "</b></td><td align=\"center\" bgcolor=\"$bgcolor2\"><b>" . _CATEGORY . "</b></td><td align=\"center\" bgcolor=\"$bgcolor2\"><b>" . _FUNCTIONS . "</b></td></tr>";
$result = $db->sql_query("SELECT * from " . $prefix . "_pages order by pid");
while ($mypages = $db->sql_fetchrow($result)) {
$mycid = intval($mypages['cid']);
$myactive = intval($mypages['active']);
$mypid = intval($mypages['pid']);
$mytitle = $mypages['title'];
if ($mycid == "0" OR $mycid == "") {
$cat_title = _NONE;
} else {
$row_res = $db->sql_fetchrow($db->sql_query("SELECT title from " . $prefix . "_pages_categories where cid='$mycid'"));
$cat_title = $row_res['title'];
}
if ($myactive == 1) {
$status = _ACTIVE;
$status_chng = _DEACTIVATE;
$active = 1;
} else {
$status = "<i>" . _INACTIVE . "</i>";
$status_chng = _ACTIVATE;
$active = 0;
}
echo "<tr><td><a href=\"modules.php?name=Content&pa=showpage&pid=$mypid\">$mytitle</a></td><td align=\"center\">$status</td><td align=\"center\">$cat_title</td><td align=\"center\">[ <a href=\"".$admin_file.".php?op=content_edit&pid=$mypid\">" . _EDIT . "</a> | <a href=\"".$admin_file.".php?op=content_change_status&pid=$mypid&active=$active\">$status_chng</a> | <a href=\"".$admin_file.".php?op=content_delete&pid=$mypid\">" . _DELETE . "</a> ]</td></tr>";
}
echo "</table>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><b>" . _ADDCATEGORY . "</b></center><br><br>"
."<form action=\"".$admin_file.".php\" method=\"post\">"
."<b>" . _TITLE . ":</b><br><input type=\"text\" name=\"cat_title\" size=\"50\"><br><br>"
."<b>" . _DEscriptION . ":</b><br>"
#// Editor Start
#$oFCKeditor = new FCKeditor(description) ;
#$oFCKeditor->InstanceName = "description" ;
#$oFCKeditor->Value = "$description" ;
#$oFCKeditor->Width = "65%" ;
#$oFCKeditor->Height = "150" ;
#$oFCKeditor->ToolbarSet = "Basic" ;
#$oFCKeditor->Create() ;
#// Editor Ende
."<textarea name=\"description\" rows=\"10\" cols=\"50\"></textarea><br><br>"
."<br>$copy<br><br><input type=\"hidden\" name=\"op\" value=\"add_category\">"
."<input type=\"submit\" value=\"" . _ADD . "\">"
."</form>";
CloseTable();
$rescat = $db->sql_query("SELECT cid, title from " . $prefix . "_pages_categories order by title");
$numrows = $db->sql_numrows($rescat);
if ($numrows > 0) {
echo "<br>";
OpenTable();
echo "<center><b>" . _EDITCATEGORY . "</b></center><br><br>"
."<form action=\"".$admin_file.".php\" method=\"post\">"
."<b>" . _CATEGORY . ":</b> "
."<select name=\"cid\">";
while ($row_cat = $db->sql_fetchrow($rescat)) {
$cid = intval($row_cat['cid']);
$cat_title = $row_cat['title'];
echo "<option value=\"$cid\">$cat_title</option>";
}
echo "</select> "
."<input type=\"hidden\" name=\"op\" value=\"edit_category\">"
."<input type=\"submit\" value=\"" . _EDIT . "\">"
."</form>";
CloseTable();
}
echo "<br>";
OpenTable();
$res2 = $db->sql_query("SELECT cid, title from " . $prefix . "_pages_categories order by title");
$numrows2 = $db->sql_numrows($res2);
echo "<center><b>" . _ADDANEWPAGE . "</b></center><br><br>"
."<form action=\"".$admin_file.".php\" method=\"post\">"
."<b>" . _TITLE . ":</b><br>"
."<input type=\"text\" name=\"title\" size=\"50\"><br><br>";
if ($numrows2 > 0) {
echo "<b>" . _CATEGORY . ":</b> "
."<select name=\"cid\">"
."<option value=\"0\" selected>" . _NONE . "</option>";
while ($row_res2 = $db->sql_fetchrow($res2)) {
$cid = intval($row_res2['cid']);
$cat_title = $row_res2['title'];
echo "<option value=\"$cid\">$cat_title</option>";
}
echo "</select><br><br>";
} else {
echo "<input type=\"hidden\" name=\"cid\" value=\"0\">";
}
echo "<b>" . _CSUBTITLE . ":</b><br>"
."<input type=\"text\" name=\"subtitle\" size=\"50\"><br><br>"
."<b>" . _HEADERTEXT . ":</b><br>";
// Editor Start
$oFCKeditor = new FCKeditor(page_header) ;
$oFCKeditor->InstanceName = "page_header" ;
#$oFCKeditor->Value = "$page_header" ;
$oFCKeditor->ToolbarSet = "PHPNuke" ;
$oFCKeditor->Create() ;
// Editor Ende
# ."<textarea name=\"page_header\" cols=\"60\" rows=\"10\"></textarea><br><br>"
echo "<br><br><b>" . _PAGETEXT . ":</b><br>"
."<font class=\"tiny\">" . _PAGEBREAK . "</font><br>";
// Editor Start
$oFCKeditor = new FCKeditor(text) ;
$oFCKeditor->InstanceName = "text" ;
#$oFCKeditor->Value = "$text" ;
$oFCKeditor->Height = "550" ;
$oFCKeditor->ToolbarSet = "PHPNuke" ;
$oFCKeditor->Create() ;
// Editor Ende
# ."<textarea name=\"text\" cols=\"60\" rows=\"40\"></textarea><br><br>"
echo "<br><br><b>" . _FOOTERTEXT . ":</b><br>";
// Editor Start
$oFCKeditor = new FCKeditor(page_footer) ;
$oFCKeditor->InstanceName = "page_footer" ;
#$oFCKeditor->Value = "$page_footer" ;
$oFCKeditor->ToolbarSet = "PHPNuke" ;
$oFCKeditor->Create() ;
// Editor Ende
# ."<textarea name=\"page_footer\" cols=\"60\" rows=\"10\"></textarea><br><br>"
echo "<br><br><b>" . _SIGNATURE . ":</b><br>";
// Editor Start
$oFCKeditor = new FCKeditor(signature) ;
$oFCKeditor->InstanceName = "signature" ;
#$oFCKeditor->Value = "$signature" ;
$oFCKeditor->Width = "60%" ;
$oFCKeditor->Height = "150" ;
$oFCKeditor->ToolbarSet = "Basic" ;
$oFCKeditor->Create() ;
// Editor Ende
# ."<textarea name=\"signature\" cols=\"60\" rows=\"5\"></textarea><br><br>";
echo "<br><br>";
if ($multilingual == 1) {
echo "<br><b>" . _LANGUAGE . ": </b>"
."<select name=\"clanguage\">";
$handle=opendir('language');
while ($file = readdir($handle)) {
if (preg_match("/^lang\-(.+)\.php/", $file, $matches)) {
$langFound = $matches[1];
$languageslist .= "$langFound ";
}
}
closedir($handle);
$languageslist = explode(" ", $languageslist);
sort($languageslist);
for ($i=0; $i < sizeof($languageslist); $i++) {
if($languageslist[$i]!="") {
echo "<option value=\"$languageslist[$i]\" ";
if($languageslist[$i]==$language) echo "selected";
echo ">".ucfirst($languageslist[$i])."</option>\n";
}
}
echo "</select><br><br>";
} else {
echo "<input type=\"hidden\" name=\"clanguage\" value=\"$language\">";
}
echo "<b>" . _ACTIVATEPAGE . "</b><br>"
."<input type=\"radio\" name=\"active\" value=\"1\" checked> " . _YES . " <input type=\"radio\" name=\"active\" value=\"0\"> " . _NO . "<br><br>"
."<input type=\"hidden\" name=\"op\" value=\"content_save\">"
."<input type=\"submit\" value=\"" . _SEND . "\">"
."</form>";
CloseTable();
include("footer.php");
}
function add_category($cat_title, $description) {
global $prefix, $db, $admin_file;
$db->sql_query("insert into " . $prefix . "_pages_categories values (NULL, '$cat_title', '$description')");
Header("Location: ".$admin_file.".php?op=content");
}
function edit_category($cid) {
global $prefix, $db, $admin_file, $copy;
include("header.php");
GraphicAdmin();
title("" . _CONTENTMANAGER . "");
OpenTable();
$cid = intval($cid);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, description from " . $prefix . "_pages_categories where cid='$cid'"));
$title = $row['title'];
$description = $row['description'];
echo "<center><b>" . _EDITCATEGORY . "</b></center><br><br>"
."<form action=\"\" method=\"post\">"
."<b>" . _TITLE . "</b><br>"
."<input type=\"text\" name=\"cat_title\" value='$title' size=\"50\"><br><br>"
."<b>" . _DEscriptION . "</b>:<br>"
#// Editor Start
#$oFCKeditor = new FCKeditor(description) ;
#$oFCKeditor->InstanceName = "description" ;
#$oFCKeditor->Value = "$description" ;
#$oFCKeditor->Width = "65%" ;
#$oFCKeditor->Height = "150" ;
#$oFCKeditor->ToolbarSet = "Basic" ;
#$oFCKeditor->Create() ;
#// Editor Ende
."<textarea cols=\"50\" rows=\"10\" name=\"description\">$description</textarea><br><br>"
."<input type=\"hidden\" name=\"cid\" value=\"$cid\">"
."<input type=\"hidden\" name=\"op\" value=\"save_category\">"
."<input type=\"submit\" value=\"" . _SAVECHANGES . "\"> "
."[ <a href=\"".$admin_file.".php?op=del_content_cat&cid=$cid\">" . _DELETE . "</a> ]"
."</form>";
CloseTable();
include("footer.php");
}
function save_category($cid, $cat_title, $description) {
global $prefix, $db, $admin_file;
$cid = intval($cid);
$db->sql_query("update " . $prefix . "_pages_categories set title='$cat_title', description='$description' where cid='$cid'");
Header("Location: ".$admin_file.".php?op=content");
}
function del_content_cat($cid, $ok=0) {
global $prefix, $db, $admin_file;
if ($ok==1) {
$cid = intval($cid);
$db->sql_query("delete from " . $prefix . "_pages_categories where cid='$cid'");
$result = $db->sql_query("SELECT pid from " . $prefix . "_pages where cid='$cid'");
while ($row = $db->sql_fetchrow($result)) {
$pid = intval($row['pid']);
$db->sql_query("update " . $prefix . "_pages set cid='0' where pid='$pid'");
}
Header("Location: ".$admin_file.".php?op=content");
} else {
include("header.php");
GraphicAdmin();
title("" . _CONTENTMANAGER . "");
$cid = intval($cid);
$row2 = $db->sql_fetchrow($db->sql_query("SELECT title from " . $prefix . "_pages_categories where cid='$cid'"));
$title = $row2['title'];
OpenTable();
echo "<center><b>" . _DELCATEGORY . ": $title</b><br><br>"
.""._DELCONTENTCAT."<br><br>"
."[ <a href=\"".$admin_file.".php?op=content\">" . _NO . "</a> | <a href=\"".$admin_file.".php?op=del_content_cat&cid=$cid&ok=1\">" . _YES . "</a> ]</center>";
CloseTable();
include("footer.php");
}
}
function content_edit($pid) {
global $prefix, $db, $language, $multilingual, $bgcolor2, $admin_file;
include("header.php");
GraphicAdmin();
title(""._CONTENTMANAGER."");
$pid = intval($pid);
$mypages = $db->sql_fetchrow($db->sql_query("SELECT * from " . $prefix . "_pages WHERE pid='$pid'"));
$mycid = intval($mypages['cid']);
$myactive = intval($mypages['active']);
$mytitle = $mypages['title'];
$mysubtitle = $mypages['subtitle'];
$mypage_header = $mypages['page_header'];
$mytext = $mypages['text'];
$mypage_footer = $mypages['page_footer'];
$mysignature = $mypages['signature'];
$myclanguage = $mypages['clanguage'];
if ($myactive == 1) {
$sel1 = "checked";
$sel2 = "";
} else {
$sel1 = "";
$sel2 = "checked";
}
OpenTable();
echo "<center><b>" . _EDITPAGECONTENT . "</b></center><br><br>"
."<form action=\"".$admin_file.".php\" method=\"post\">"
."<b>" . _TITLE . ":</b><br>"
."<input type=\"text\" name=\"title\" size=\"50\" value=\"$mytitle\"><br><br>";
$res = $db->sql_query("SELECT cid, title from " . $prefix . "_pages_categories");
$numrows = $db->sql_numrows($res);
if ($numrows > 0) {
echo "<b>" . _CATEGORY . ":</b> "
."<select name=\"cid\">";
if ($mycid == 0) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option value=\"0\" $sel>" . _NONE . "</option>";
while ($row_res = $db->sql_fetchrow($res)) {
$cid = intval($row_res['cid']);
$cat_title = $row_res['title'];
if ($mycid == $cid) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option value=\"$cid\" $sel>$cat_title</option>";
}
echo "</select><br><br>";
} else {
echo "<input type=\"hidden\" name=\"cid\" value=\"0\">";
}
echo "<b>" . _CSUBTITLE . ":</b><br>"
."<input type=\"text\" name=\"subtitle\" size=\"50\" value=\"$mysubtitle\"><br><br>"
."<b>" . _HEADERTEXT . ":</b><br>";
// Editor Start
$oFCKeditor = new FCKeditor(page_header) ;
$oFCKeditor->InstanceName = "page_header" ;
$oFCKeditor->Value = "$mypage_header" ;
$oFCKeditor->ToolbarSet = "PHPNuke" ;
$oFCKeditor->Create() ;
// Editor Ende
# ."<textarea name=\"page_header\" cols=\"60\" rows=\"10\">$mypage_header</textarea><br><br>"
echo "<br><br><b>" . _PAGETEXT . ":</b><br>"
."<font class=\"tiny\">" . _PAGEBREAK . "</font><br>";
// Editor Start
$oFCKeditor = new FCKeditor(text) ;
$oFCKeditor->InstanceName = "text" ;
$oFCKeditor->Value = "$mytext" ;
$oFCKeditor->Height = "550" ;
$oFCKeditor->ToolbarSet = "PHPNuke" ;
$oFCKeditor->Create() ;
// Editor Ende
# ."<textarea name=\"text\" cols=\"60\" rows=\"40\">$mytext</textarea><br><br>"
echo "<br><br><b>" . _FOOTERTEXT . ":</b><br>";
// Editor Start
$oFCKeditor = new FCKeditor(page_footer) ;
$oFCKeditor->InstanceName = "page_footer" ;
$oFCKeditor->Value = "$mypage_footer" ;
$oFCKeditor->ToolbarSet = "PHPNuke" ;
$oFCKeditor->Create() ;
// Editor Ende
# ."<textarea name=\"page_footer\" cols=\"60\" rows=\"10\">$mypage_footer</textarea><br><br>"
echo "<br><br><b>" . _SIGNATURE . ":</b><br>";
// Editor Start
$oFCKeditor = new FCKeditor(signature) ;
$oFCKeditor->InstanceName = "signature" ;
$oFCKeditor->Value = "$mysignature" ;
$oFCKeditor->Width = "60%" ;
$oFCKeditor->Height = "150" ;
$oFCKeditor->ToolbarSet = "Basic" ;
$oFCKeditor->Create() ;
// Editor Ende
# ."<textarea name=\"signature\" cols=\"60\" rows=\"5\">$mysignature</textarea><br><br>";
echo "<br><br>";
if ($multilingual == 1) {
echo "<br><b>" . _LANGUAGE . ": </b>"
."<select name=\"clanguage\">";
$handle=opendir('language');
while ($file = readdir($handle)) {
if (preg_match("/^lang\-(.+)\.php/", $file, $matches)) {
$langFound = $matches[1];
$languageslist .= "$langFound ";
}
}
closedir($handle);
$languageslist = explode(" ", $languageslist);
sort($languageslist);
for ($i=0; $i < sizeof($languageslist); $i++) {
if($languageslist[$i]!="") {
echo "<option value=\"$languageslist[$i]\" ";
if($languageslist[$i]==$language) echo "selected";
echo ">".ucfirst($languageslist[$i])."</option>\n";
}
}
echo "</select><br><br>";
} else {
echo "<input type=\"hidden\" name=\"clanguage\" value=\"$myclanguage\">";
}
echo "<b>" . _ACTIVATEPAGE . "</b><br>"
."<input type=\"radio\" name=\"active\" value=\"1\" $sel1> " . _YES . "  <input type=\"radio\" name=\"active\" value=\"0\" $sel2> " . _NO . "<br><br>"
."<input type=\"hidden\" name=\"pid\" value=\"$pid\">"
."<input type=\"hidden\" name=\"op\" value=\"content_save_edit\">"
."<input type=\"submit\" value=\"" . _SAVECHANGES . "\">"
."</form>";
CloseTable();
include("footer.php");
}
function content_save($title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $db, $admin_file;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
$subtitle = stripslashes(FixQuotes($subtitle));
$db->sql_query("insert into " . $prefix . "_pages values (NULL, '$cid', '$title', '$subtitle', '$active', '$page_header', '$text', '$page_footer', '$signature', now(), '0', '$clanguage')");
Header("Location: ".$admin_file.".php?op=content");
}
function content_save_edit($pid, $title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $db, $admin_file;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
$subtitle = stripslashes(FixQuotes($subtitle));
$pid = intval($pid);
$db->sql_query("update " . $prefix . "_pages set cid='$cid', title='$title', subtitle='$subtitle', active='$active', page_header='$page_header', text='$text', page_footer='$page_footer', signature='$signature', clanguage='$clanguage' where pid='$pid'");
Header("Location: ".$admin_file.".php?op=content");
}
function content_change_status($pid, $active) {
global $prefix, $db, $admin_file;
if ($active == 1) {
$new_active = 0;
} elseif ($active == 0) {
$new_active = 1;
}
$pid = intval($pid);
$db->sql_query("update " . $prefix . "_pages set active='$new_active' WHERE pid='$pid'");
Header("Location: ".$admin_file.".php?op=content");
}
function content_delete($pid, $ok=0) {
global $prefix, $db, $admin_file;
$pid = intval($pid);
if ($ok==1) {
$db->sql_query("delete from " . $prefix . "_pages where pid='$pid'");
Header("Location: ".$admin_file.".php?op=content");
} else {
include("header.php");
GraphicAdmin();
title("" . _CONTENTMANAGER . "");
$row = $db->sql_fetchrow($db->sql_query("SELECT title from " . $prefix . "_pages where pid='$pid'"));
$title = $row['title'];
OpenTable();
echo "<center><b>" . _DELCONTENT . ": $title</b><br><br>"
.""._DELCONTWARNING." $title?<br><br>"
."[ <a href=\"".$admin_file.".php?op=content\">" . _NO . "</a> | <a href=\"".$admin_file.".php?op=content_delete&pid=$pid&ok=1\">" . _YES . "</a> ]</center>";
CloseTable();
include("footer.php");
}
}
switch ($op) {
case "content":
content();
break;
case "content_edit":
content_edit($pid);
break;
case "content_delete":
content_delete($pid, $ok);
break;
case "content_review":
content_review($title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active);
break;
case "content_save":
content_save($title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid);
break;
case "content_save_edit":
content_save_edit($pid, $title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid);
break;
case "content_change_status":
content_change_status($pid, $active);
break;
case "add_category":
add_category($cat_title, $description);
break;
case "edit_category":
edit_category($cid);
break;
case "save_category":
save_category($cid, $cat_title, $description);
break;
case "del_content_cat":
del_content_cat($cid, $ok);
break;
}
} else {
include("header.php");
GraphicAdmin();
OpenTable();
echo "<center><b>"._ERROR."</b><br><br>You do not have administration permission for module \"$module_name\"</center>";
CloseTable();
include("footer.php");
}
?>
Başa dön
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız