Przedszkolak
Postów: 94
Data rejestracji: 02.08.2006 08:48
|
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright Š 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Comments system developed by CrappoMan
| email:
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }
include LOCALE.LOCALESET."comments.php";
function showcomments($ctype,$cdb,$ccol,$cid,$clink) {
global $settings,$locale,$userdata,$aidlink;
if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
$flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
fallback(BASEDIR."index.php");
}
if (iMEMBER) {
$comment_name = $userdata['user_id'];
} elseif ($settings['guestposts'] == "1") {
$comment_name = trim(stripinput($_POST['comment_name']));
$comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
if (isNum($comment_name)) $comment_name="";
}
$comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
$comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
$result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
if (!iSUPERADMIN || dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_comment']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
if (iMEMBER) $result = dbquery("UPDATE ".DB_PREFIX."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
}
}
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
}
redirect($clink);
}
tablebreak();
opentable($locale['c100']);
$result = dbquery(
"SELECT tcm.*,user_name FROM ".DB_PREFIX."comments tcm
LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
WHERE comment_item_id='$cid' AND comment_type='$ctype'
ORDER BY comment_datestamp ASC"
);
if (dbrows($result) != 0) {
$i = 0;
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>\n";
if ($data['user_name']) {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'>".$data['user_name']."</a>";
} else {
echo $data['comment_name'];
}
if ($data['comment_smileys'] == "1") {
$comment_message = parsesmileys($data['comment_message']);
} else {
$comment_message = $data['comment_message'];
}
$comment_message = nl2br(parseubb($comment_message));
echo "</span>\n<span class='small'>".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br>\n";
echo $comment_message."</td>\n</tr>\n";
$i++;
}
if (checkrights("C")) echo "<tr>\n<td align='right' class='".($i% 2==0?"tbl1":"tbl2")."'><a href='".ADMIN."comments.php".$aidlink."&ctype=$ctype&cid=$cid'>".$locale['c106']."</a></td>\n</tr>\n";
echo "</table>\n";
} else {
echo $locale['c101']."\n";
}
closetable();
tablebreak();
opentable($locale['c102']);
if (iMEMBER || $settings['guestposts'] == "1") {
echo "<form name='inputform' method='post' action='$clink'>
<table align='center' cellspacing='0' cellpadding='0' class='tbl'>\n";
if (iGUEST) {
echo "<tr>
<td>".$locale['c103']."</td>
</tr>
<tr>
<td><input type='text' name='comment_name' maxlength='30' class='textbox' style='width:100%;'></td>
</tr>\n";
}
echo "<tr>
<td align='center'><textarea name='comment_message' rows='6' cols='74' class='textbox'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('comment_message', '[b]', '[/b]');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('comment_message', '[i]', '[/i]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('comment_message', '[u]', '[/u]');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('comment_message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('comment_message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('comment_message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('comment_message', '[center]', '[/center]');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('comment_message', '[small]', '[/small]');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('comment_message', '[code]', ' ');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('comment_message', '', ' ');\">
<br><br>
".displaysmileys("comment_message")."
</tr>
<tr>
<td align='center'><input type='checkbox' name='disable_smileys' value='1'>".$locale['c107']."<br><br>
<input type='submit' name='post_comment' value='".$locale['c102']."' class='button'></td>
</tr>
</table>
</form>\n";
} else {
echo $locale['c105']."\n";
}
closetable();
}
?>[/code]
A co odpowiada za szerokość tego pola bo nie kaman ???
Tak samo się dzieje po otworzeniu strony KONTAKT (wjeżdża na lewe panele)
Edytowane przez xeo dnia 07.03.2008 08:44:19
__________________________________________
Jestem głęboko wierzącym ateistą.(Albert Einstein)
Kto wie, ile trzeba wiedzieć, aby wiedzieć, że się jeszcze wszystkiego nie wie?
|
Przedszkolak
Postów: 94
Data rejestracji: 02.08.2006 08:48
|
Pogrubione odpowiada za wielkość pola. Znajdź w kodzie i zmień. Tak samo jest w contact.php i innych. Prawdopodobnie masz bardzo wąski them.
Ogólnie zwężałem go sam w jakimś pliku, nie pamiętam dokładnie w którym ale to nie problem go odnaleźć, lecz myślałem że będzie spoko a tu coraz więcej rzeczy mi się rozjeżdża.
Ale thx za podpowiedź....
W contact.php kod jest całkiem inny, a który odpowiada za ogólną szerokość tego pola/strony
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright Š 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."contact.php";
if (isset($_POST['sendmessage'])) {
$error = "";
$mailname = substr(stripinput(trim($_POST['mailname'])),0,50);
$email = substr(stripinput(trim($_POST['email'])),0,100);
$subject = substr(str_replace(array("\r","\n","@"), "", descript(stripslash(trim($_POST['subject'])))),0,50);
$message = descript(stripslash(trim($_POST['message'])));
if ($mailname == "") {
$error .= "ˇ <span class='alt'>".$locale['420']."</span><br>\n";
}
if ($email == "" || !preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $email)) {
$error .= "ˇ <span class='alt'>".$locale['421']."</span><br>\n";
}
if ($subject == "") {
$error .= "ˇ <span class='alt'>".$locale['422']."</span><br>\n";
}
if ($message == "") {
$error .= "ˇ <span class='alt'>".$locale['423']."</span><br>\n";
}
if (!$error) {
require_once INCLUDES."sendmail_include.php";
sendemail($settings['siteusername'],$settings['siteemail'],$mailname,$email,$subject,$message);
opentable($locale['400']);
echo "<center><br>\n".$locale['440']."<br><br>\n".$locale['441']."</center><br>\n";
closetable();
} else {
opentable($locale['400']);
echo "<center><br>\n".$locale['442']."<br><br>\n$error<br>\n".$locale['443']."</center><br>\n";
closetable();
}
} else {
opentable($locale['400']);
echo $locale['401']."<br><br>
<form name='userform' method='post' action='".FUSION_SELF."'>
<table align='center' cellpadding='0' cellspacing='0' class='tbl'>
<tr>
<td width='100'>".$locale['402']."</td>
<td><input type='text' name='mailname' maxlength='50' class='textbox' style='width: 200px;'></td>
</tr>
<tr>
<td width='100'>".$locale['403']."</td>
<td><input type='text' name='email' maxlength='100' class='textbox' style='width: 200px;'></td>
</tr>
<tr>
<td width='100'>".$locale['404']."</td>
<td><input type='text' name='subject' maxlength='50' class='textbox' style='width: 200px;'></td>
</tr>
<tr><td valign='top' width='90'>".$locale['405']."</td>
<td><textarea name='message' rows='10' cols='58' class='textbox'></textarea></td>
</tr>
<tr>
<td align='center' colspan='2'>
<input type='submit' name='sendmessage' value='".$locale['406']."' class='button'>
</td>
</tr>
</table>
</form>\n";
closetable();
}
require_once "side_right.php";
require_once "footer.php";
?>
Edytowane przez xeo dnia 07.03.2008 12:24:48
__________________________________________
Jestem głęboko wierzącym ateistą.(Albert Einstein)
Kto wie, ile trzeba wiedzieć, aby wiedzieć, że się jeszcze wszystkiego nie wie?
|