• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

ChickenStyle

New Member
run theo đường dẩn root/forum/incfiles/

tạo 1 files tên là tiento.php


PHP:
<?php
defined('_IN_JOHNCMS') or die('Error: restricted access');
//--Mobiviet-VN-//

function tiento($text) {
if ($text ==1) {
$tiento='<b><font color="red">[Share]</font></b> ';
} elseif ($text ==2) {
$tiento='<b><font color="blue">[Giúp]</font></b> ';
} elseif ($text ==3) {
$tiento='<b><font color="red">[HOT]</font></b> ';
} elseif ($text ==4) {
$tiento='<b><font color="red">[Thông báo]</font></b> ';
} elseif ($text ==5) {
$tiento='<b><font color="green">[Thảo luận]</font></b> ';
} elseif ($text ==6) {
$tiento='<b><font color="blue">[Hướng dẫn]</font></b> ';
} elseif ($text == 9){
$tiento = '<b><font color="red">[Test]</font></b> ';
} elseif ($text == 10){
$tiento = '<b><font color="red">[BOT]</font></b> ';
} else {
$tiento = '';
}
return $tiento;
}



    if (!$id) {
        require('../incfiles/head.php');
        echo functions::display_error($lng['error_wrong_data']);
        require('../incfiles/end.php');
        exit;
    }

    $typ = mysql_query("SELECT * FROM `forum` WHERE `id` = '$id'");
    $ms = mysql_fetch_assoc($typ);
    if ($ms['type'] != "t") {
        require('../incfiles/head.php');
        echo functions::display_error($lng['error_wrong_data']);
        require('../incfiles/end.php');
        exit;
    }

require('../incfiles/head.php');


if (isset($_POST['submit'])){

mysql_query("UPDATE `forum` SET `tiento` = '".$_POST['m']."' WHERE `id` = '$id'");

echo '<div class="topmenu">Thay đổi thành công</div>';

}








echo '<div class="list1">
<form action="index.php?act=tiento&amp;id=' . $id . '" method="post">
<input type="radio" name="m" value="1" ' . ($ms['tiento'] == 0 ? 'checked="checked"' : '') . ' /> <font color="red"><b>Share</b></font>

<input type="radio" name="m" value="2" ' . ($ms['tiento'] == 1 ? 'checked="checked"' : '') . '/> <font color="#800080">Giúp</font>

<input type="radio" name="m" value="3" ' . ($ms['tiento'] == 2 ? 'checked="checked"' : '') . ' /> <font color="#BF3EFF">HOT</font>

<input type="radio" name="m" value="4" ' . ($ms['tiento'] == 3 ? 'checked="checked"' : '') . '/> <font color="#FF69B4">Thông báo</font>

<input type="submit" name="submit" value="Xác nhận" /></form></div>';


?>


Vào forum/index.php

tìm

Code:
'files',

thêm đoạn code vào dưới

Code:
'tiento',

hoàn chỉnh
Code:
'files',
'tiento',

thế là xong

url muốn vào phần edit là /forum/index.php?act=tiento&id=35

nguồn: Diễn Đàn Mobile Việt Nam
 

Facebook Comments

New posts New threads New resources

Back
Top