Edytuj plik submit.php, znajdz (linie ~26-72):
if ($_GET['stype'] == "l") {
if (isset($_POST['submit_link'])) {
if ($_POST['link_name'] != "" && $_POST['link_url'] != "" && $_POST['link_description'] != "") {
$submit_info['link_category'] = stripinput($_POST['link_category']);
$submit_info['link_name'] = stripinput($_POST['link_name']);
$submit_info['link_url'] = stripinput($_POST['link_url']);
$submit_info['link_description'] = stripinput($_POST['link_description']);
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('l', '".$userdata['user_id']."', '".time()."', '".serialize($submit_info)."')");
add_to_title($locale['global_200'].$locale['400']);
opentable($locale['400']);
echo "<div style='text-align:center'><br />\n".$locale['410']."<br /><br />\n";
echo "<a href='submit.php?stype=l'>".$locale['411']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
closetable();
}
} else {
$opts = "";
add_to_title($locale['global_200'].$locale['400']);
opentable($locale['400']);
$result = dbquery("SELECT * FROM ".DB_WEBLINK_CATS." WHERE ".groupaccess("weblink_cat_access")." ORDER BY weblink_cat_name");
if (dbrows($result)) {
while ($data = dbarray($result)) {
$opts .= "<option value='".$data['weblink_cat_id']."'>".$data['weblink_cat_name']."</option>\n";
}
echo $locale['420']."<br /><br />\n";
echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=l' onsubmit='return validateLink(this);'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n";
echo "<tr>\n<td class='tbl'>".$locale['421']."</td>\n";
echo "<td class='tbl'><select name='link_category' class='textbox'>\n$opts</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['422']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_name' maxlength='100' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['423']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_url' value='http://' maxlength='200' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['424']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_description' maxlength='200' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
echo "<input type='submit' name='submit_link' value='".$locale['425']."' class='button' />\n</td>\n";
echo "</tr>\n</table>\n</form>\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
}
closetable();
}
Kliknij i zaczekaj na załadowanie kodu ...
i zamien na:
if ($_GET['stype'] == "l") {
if (isset($_POST['submit_link'])) {
if ($_POST['link_name'] != "" && $_POST['link_url'] != "") {
$submit_info['link_category'] = stripinput($_POST['link_category']);
$submit_info['link_name'] = stripinput($_POST['link_name']);
$submit_info['link_url'] = stripinput($_POST['link_url']);
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('l', '".$userdata['user_id']."', '".time()."', '".serialize($submit_info)."')");
add_to_title($locale['global_200'].$locale['400']);
opentable($locale['400']);
echo "<div style='text-align:center'><br />\n".$locale['410']."<br /><br />\n";
echo "<a href='submit.php?stype=l'>".$locale['411']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
closetable();
}
} else {
$opts = "";
add_to_title($locale['global_200'].$locale['400']);
opentable($locale['400']);
$result = dbquery("SELECT * FROM ".DB_WEBLINK_CATS." WHERE ".groupaccess("weblink_cat_access")." ORDER BY weblink_cat_name");
if (dbrows($result)) {
while ($data = dbarray($result)) {
$opts .= "<option value='".$data['weblink_cat_id']."'>".$data['weblink_cat_name']."</option>\n";
}
echo $locale['420']."<br /><br />\n";
echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=l' onsubmit='return validateLink(this);'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n";
echo "<tr>\n<td class='tbl'>".$locale['421']."</td>\n";
echo "<td class='tbl'><select name='link_category' class='textbox'>\n$opts</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['422']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_name' maxlength='100' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['423']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_url' value='http://' maxlength='200' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
echo "<input type='submit' name='submit_link' value='".$locale['425']."' class='button' />\n</td>\n";
echo "</tr>\n</table>\n</form>\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
}
closetable();
}
Kliknij i zaczekaj na załadowanie kodu ...
Nastepnie edytuj plik administration/submissions.php, znajdz (linie ~101-172):
if ((isset($_GET['action']) && $_GET['action'] == "2") && (isset($_GET['t']) && $_GET['t'] == "l")) {
if (isset($_POST['add']) && (isset($_GET['submit_id']) && isnum($_GET['submit_id']))) {
$link_name = stripinput($_POST['link_name']);
$link_url = stripinput($_POST['link_url']);
$link_description = stripinput($_POST['link_description']);
$result = dbquery("INSERT INTO ".DB_WEBLINKS." (weblink_name, weblink_description, weblink_url, weblink_cat, weblink_datestamp, weblink_count) VALUES ('$link_name', '$link_description', '$link_url', '".$_POST['link_category']."', '".time()."', '0')");
$result = dbquery("DELETE FROM ".DB_SUBMISSIONS." WHERE submit_id='".$_GET['submit_id']."'");
opentable($locale['430']);
echo "<br /><div style='text-align:center'>".$locale['431']."<br /><br />\n";
echo "<a href='".FUSION_SELF.$aidlink."'>".$locale['402']."</a><br /><br />\n";
echo "<a href='index.php".$aidlink."'>".$locale['403']."</a></div><br />\n";
closetable();
} else if (isset($_POST['delete']) && (isset($_GET['submit_id']) && isnum($_GET['submit_id']))) {
opentable($locale['432']);
$result = dbquery("DELETE FROM ".DB_SUBMISSIONS." WHERE submit_id='".$_GET['submit_id']."'");
echo "<br /><div style='text-align:center'>".$locale['433']."<br /><br />\n";
echo "<a href='".FUSION_SELF.$aidlink."'>".$locale['402']."</a><br /><br />\n";
echo "<a href='index.php".$aidlink."'>".$locale['403']."</a></div><br />\n";
closetable();
} else {
$result = dbquery(
"SELECT ts.*, user_id,user_name FROM ".DB_SUBMISSIONS." ts
LEFT JOIN ".DB_USERS." tu ON ts.submit_user=tu.user_id
WHERE submit_id='".$_GET['submit_id']."'"
);
if (dbrows($result)) {
$data = dbarray($result);
$opts = ""; $sel = "";
$submit_criteria = unserialize($data['submit_criteria']);
$posted = showdate("longdate", $data['submit_datestamp']);
$result2 = dbquery("SELECT * FROM ".DB_WEBLINK_CATS." ORDER BY weblink_cat_name");
if (dbrows($result2) != 0) {
while($data2 = dbarray($result2)) {
if (isset($submit_criteria['link_category'])) {
$sel = ($submit_criteria['link_category'] == $data2['weblink_cat_id'] ? " selected='selected'" : "");
}
$opts .= "<option value='".$data2['weblink_cat_id']."'$sel>".$data2['weblink_cat_name']."</option>\n";
}
} else {
$opts .= "<option value='0'>".$locale['434']."</option>\n";
}
opentable($locale['440']);
echo "<form name='publish' method='post' action='".FUSION_SELF.$aidlink."&action=2&t=l&submit_id=".$_GET['submit_id']."'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
echo "<td style='text-align:center;' class='tbl'>".$locale['441']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a>".$locale['442'].$posted."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td style='text-align:center;' class='tbl'><a href='".$submit_criteria['link_url']."' target='_blank'>".$submit_criteria['link_name']."</a> - ".$submit_criteria['link_url']."</td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
echo "<td class='tbl'>".$locale['443']."</td>\n";
echo "<td class='tbl'><select name='link_category' class='textbox'>\n".$opts."</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['444']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_name' value='".$submit_criteria['link_name']."' class='textbox' style='width:300px' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['445']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_url' value='".$submit_criteria['link_url']."' class='textbox' style='width:300px' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['446']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_description' value='".$submit_criteria['link_description']."' class='textbox' style='width:300px' /></td>\n";
echo "</tr>\n</table>\n";
echo "<div style='text-align:center'><br />\n";
echo $locale['447']."<br />\n";
echo "<input type='submit' name='add' value='".$locale['448']."' class='button' />\n";
echo "<input type='submit' name='delete' value='".$locale['449']."' class='button' /></div>\n";
echo "</form>\n";
closetable();
} else {
redirect(FUSION_SELF.$aidlink);
}
}
}
Kliknij i zaczekaj na załadowanie kodu ...
i zamien na:
if ((isset($_GET['action']) && $_GET['action'] == "2") && (isset($_GET['t']) && $_GET['t'] == "l")) {
if (isset($_POST['add']) && (isset($_GET['submit_id']) && isnum($_GET['submit_id']))) {
$link_name = stripinput($_POST['link_name']);
$link_url = stripinput($_POST['link_url']);
$result = dbquery("INSERT INTO ".DB_WEBLINKS." (weblink_name, weblink_url, weblink_cat, weblink_datestamp, weblink_count) VALUES ('$link_name', '$link_url', '".$_POST['link_category']."', '".time()."', '0')");
$result = dbquery("DELETE FROM ".DB_SUBMISSIONS." WHERE submit_id='".$_GET['submit_id']."'");
opentable($locale['430']);
echo "<br /><div style='text-align:center'>".$locale['431']."<br /><br />\n";
echo "<a href='".FUSION_SELF.$aidlink."'>".$locale['402']."</a><br /><br />\n";
echo "<a href='index.php".$aidlink."'>".$locale['403']."</a></div><br />\n";
closetable();
} else if (isset($_POST['delete']) && (isset($_GET['submit_id']) && isnum($_GET['submit_id']))) {
opentable($locale['432']);
$result = dbquery("DELETE FROM ".DB_SUBMISSIONS." WHERE submit_id='".$_GET['submit_id']."'");
echo "<br /><div style='text-align:center'>".$locale['433']."<br /><br />\n";
echo "<a href='".FUSION_SELF.$aidlink."'>".$locale['402']."</a><br /><br />\n";
echo "<a href='index.php".$aidlink."'>".$locale['403']."</a></div><br />\n";
closetable();
} else {
$result = dbquery(
"SELECT ts.*, user_id,user_name FROM ".DB_SUBMISSIONS." ts
LEFT JOIN ".DB_USERS." tu ON ts.submit_user=tu.user_id
WHERE submit_id='".$_GET['submit_id']."'"
);
if (dbrows($result)) {
$data = dbarray($result);
$opts = ""; $sel = "";
$submit_criteria = unserialize($data['submit_criteria']);
$posted = showdate("longdate", $data['submit_datestamp']);
$result2 = dbquery("SELECT * FROM ".DB_WEBLINK_CATS." ORDER BY weblink_cat_name");
if (dbrows($result2) != 0) {
while($data2 = dbarray($result2)) {
if (isset($submit_criteria['link_category'])) {
$sel = ($submit_criteria['link_category'] == $data2['weblink_cat_id'] ? " selected='selected'" : "");
}
$opts .= "<option value='".$data2['weblink_cat_id']."'$sel>".$data2['weblink_cat_name']."</option>\n";
}
} else {
$opts .= "<option value='0'>".$locale['434']."</option>\n";
}
opentable($locale['440']);
echo "<form name='publish' method='post' action='".FUSION_SELF.$aidlink."&action=2&t=l&submit_id=".$_GET['submit_id']."'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
echo "<td style='text-align:center;' class='tbl'>".$locale['441']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a>".$locale['442'].$posted."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td style='text-align:center;' class='tbl'><a href='".$submit_criteria['link_url']."' target='_blank'>".$submit_criteria['link_name']."</a> - ".$submit_criteria['link_url']."</td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
echo "<td class='tbl'>".$locale['443']."</td>\n";
echo "<td class='tbl'><select name='link_category' class='textbox'>\n".$opts."</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['444']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_name' value='".$submit_criteria['link_name']."' class='textbox' style='width:300px' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['445']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_url' value='".$submit_criteria['link_url']."' class='textbox' style='width:300px' /></td>\n";
echo "</tr>\n</table>\n";
echo "<div style='text-align:center'><br />\n";
echo $locale['447']."<br />\n";
echo "<input type='submit' name='add' value='".$locale['448']."' class='button' />\n";
echo "<input type='submit' name='delete' value='".$locale['449']."' class='button' /></div>\n";
echo "</form>\n";
closetable();
} else {
redirect(FUSION_SELF.$aidlink);
}
}
}
Kliknij i zaczekaj na załadowanie kodu ...
Tyle odnosnie zglaszania i akceptowania.
Chciales jeszcze, aby usunac opis, date i wejscia, wiec edytuj plik weblinks.php, znajdz (linie ~77-81):
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
echo "<tr>\n<td colspan='2' class='tbl2'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&weblink_id=".$data['weblink_id']."' target='_blank'>".$data['weblink_name']."</a>$new</td>\n</tr>\n";
if ($data['weblink_description'] != "") echo "<tr>\n<td colspan='2' class='tbl1'>".nl2br(stripslashes($data['weblink_description']))."</td>\n</tr>\n";
echo "<tr>\n<td width='30%' class='tbl2'><strong>".$locale['411']."</strong> ".showdate("shortdate", $data['weblink_datestamp'])."</td>\n";
echo "<td width='70%' class='tbl1'><strong>".$locale['412']."</strong> ".$data['weblink_count']."</td>\n</tr>\n</table>\n";
Kliknij i zaczekaj na załadowanie kodu ...
i zamien na:
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
echo "<tr>\n<td colspan='2' class='tbl2'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&weblink_id=".$data['weblink_id']."' target='_blank'>".$data['weblink_name']."</a>$new</td>\n</tr>\n</table>\n";
Kliknij i zaczekaj na załadowanie kodu ...
To wszystko w tym temacie.
Dodatkowo umieszczam w zalaczniku zmodyfikowane pliki v7.00.
Pieka dodał/a następującą plik:
Jestem jaki jestem
|