Toplam Üye:
32638
Aktif Üye:
0
Aktif Ziyaretçi:
151
ME_Haber 2.3 ..(108759 okuma, 145 yanıt) Resim Galerisi Modülü 2.0 ..(121814 okuma, 173 yanıt) Ustalardan Bir Ricam Olac ..(13623 okuma, 6 yanıt) nukecode.com will close ..(11200 okuma, 5 yanıt) super youtube player a lo ..(6335 okuma, 1 yanıt) Need good PHP Haber port ..(5606 okuma, 0 yanıt) Forum Nasil Tam Sayfa Olu ..(35116 okuma, 40 yanıt) Php nuke Forumu Düzenleme ..(9941 okuma, 6 yanıt) Yeni Üyelik Aktivasyon Li ..(10984 okuma, 6 yanıt) Aşk Flashları Modülü ..(6979 okuma, 2 yanıt) resim galeri 2.0 da kateg ..(11419 okuma, 9 yanıt) Yeni iki modul: Merhumlar ..(32381 okuma, 36 yanıt) ürün tanıtım modülü ..(25232 okuma, 23 yanıt) PHP Nuke is out ..(15001 okuma, 13 yanıt) MSN Video Bing Video oldu ..(5196 okuma, 0 yanıt) haberhit.com ..(5787 okuma, 1 yanıt) Bilgi Yarışması 1.0 tama ..(51949 okuma, 72 yanıt) Musıc Box elinde olan var ..(6685 okuma, 2 yanıt) Online Okey , Batak , Tav ..(173242 okuma, 340 yanıt) Emlak Modül ve Blockları ..(12291 okuma, 8 yanıt) WM who ist shampions ..(5043 okuma, 1 yanıt) coppermine resim galerisi ..(5488 okuma, 1 yanıt) Forumda Teşekkür Eklentis ..(9078 okuma, 7 yanıt) free wordpress themes ..(5575 okuma, 1 yanıt) JW image rotator for nsn ..(7648 okuma, 4 yanıt) need Iletisim module ..(11008 okuma, 8 yanıt) Yeni modul: İletişim modu ..(27654 okuma, 33 yanıt) Başvuru Modulu ve Etkinli ..(5829 okuma, 1 yanıt) world cup flash ..(5042 okuma, 0 yanıt) ..:: Php Nuke FTP link Ha ..(4940 okuma, 0 yanıt) yeni phpnuke youtube 2.0 ..(5162 okuma, 1 yanıt) Content Plus Önceki Konu ..(4773 okuma, 0 yanıt) Php nuke Tickets Modülü ..(7972 okuma, 5 yanıt) need help to news time ..(4544 okuma, 0 yanıt) NSN News v3.0 new plugin ..(4831 okuma, 0 yanıt) how to save flash as imag ..(6047 okuma, 2 yanıt) Video Blok Yardım Lütfen. ..(5987 okuma, 2 yanıt) gazete ara ..(9787 okuma, 5 yanıt) Bizim Yazarlar ve Bizim Ş ..(14952 okuma, 14 yanıt) Nuke Reflections v2 Türkç ..(14555 okuma, 14 yanıt) CNB Your Account 750 442 ..(14238 okuma, 13 yanıt) Admin panelindeki simge ç ..(12345 okuma, 9 yanıt) Hosting Modülü ..(14022 okuma, 13 yanıt) Bizim şairler Modülü ..(5182 okuma, 1 yanıt) new plugin for nsn news v ..(4759 okuma, 1 yanıt) php nuke 8.0 türkce dil s ..(6924 okuma, 3 yanıt) Kan Bankası Modül istek ..(6132 okuma, 2 yanıt) Haber Konulari Sayfasinda ..(5755 okuma, 2 yanıt) Kan Bankası Modülünde İsi ..(7057 okuma, 3 yanıt) sonhaberler flash block ..(6623 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-20, 16:50:31 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