Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей.
Здесь обсуждаются безопасность, программирование, технологии и многое другое.
Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
 |
|

27.12.2008, 17:07
|
|
Постоянный
Регистрация: 21.08.2008
Сообщений: 302
Провел на форуме: 458686
Репутация:
-25
|
|
Вопрос?
Почему когда я заменил user на логин он стал отоброжаться в браузере вот так:
ˮ㨭:
Ϡ𮫼:
Ǡﮬ?>
код:
PHP код:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>{app_title} | {app_page}</title>
<meta name="description" content="{app_description}" />
<meta name="keywords" content="{app_keywords}" />
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<script type="text/javascript" src="{virtual_path}includes/js/misc.js"></script>
<script type="text/javascript" src="{virtual_path}includes/js/codebreeder.js"></script>
<link rel="stylesheet" type="text/css" href="{virtual_tpl_path}{loggedin_template}/media/style.css">
</head>
<body <!-- IF system_enable_chat AND loggedin AND loggedin_can_chat -->onload="checkChat('{virtual_path}',{system_chat_check},{system_chat_check_delay});"<!-- ENDIF -->>
<table cellspacing="0" cellpadding="0" width="780" align="center">
<tr>
<td class="page">
<div id="header">
<a href="{virtual_path}">{app_title}</a>
</div>
</td>
</tr>
<tr>
<td class="page">
<div id="mainnav">
<ul>
<!-- IF system_enable_news == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","news/index.html","index.php?m=news"}" title="{lang:"core","menu_news"}">{lang:"core","menu_news"}</a></li>
<!-- ENDIF -->
<!-- IF loggedin == "0" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","register/index.html","index.php?m=register"}" title="{lang:"core","menu_register"}">{lang:"core","menu_register"}</a></li>
<!-- ELSE -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","profile/index.html","index.php?m=profile"}" title="{lang:"core","usermenu_profile"}">{lang:"core","usermenu_profile"}</a></li>
<!-- ENDIF -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","search/index.html","index.php?m=search"}" title="{lang:"core","menu_search"}">{lang:"core","menu_search"}</a></li>
<!-- IF system_enable_picture_rating == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","rate/index.html","index.php?m=rate"}" title="{lang:"core","menu_rate"}">{lang:"core","menu_rate"}</a></li>
<!-- ENDIF -->
<!-- IF system_enable_feedback == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","contactus/index.html","index.php?m=contactus"}" title="{lang:"core","menu_contactus"}">{lang:"core","menu_contactus"}</a></li>
<!-- ENDIF -->
<!-- IF system_enable_tellfriend == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","tellfriend/index.html","index.php?m=tellfriend"}" title="{lang:"core","menu_tellfriend"}">{lang:"core","menu_tellfriend"}</a></li>
<!-- ENDIF -->
<!-- IF loggedin_can_access_cp == "1" -->
<li><a href="{virtual_cp_path}" title="{lang:"core","usermenu_cp"}" target="_blank">{lang:"core","usermenu_cp"}</a></li>
<!-- ENDIF -->
</ul>
</div>
<div id="mainnavshade"><img src="{virtual_tpl_path}{loggedin_template}/media/topnavshade_bg.gif" /><br /></div>
</td>
</tr>
<tr>
<td class="page">
<div id="pageheader">
<!-- IF loggedin == "0" -->
<h1>Hello Guest</h1>
<h2>Welcome to {app_title}. <a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","register/index.html","index.php?m=register"}">Ready to sign up?</a></h2>
<!-- ELSE -->
<h1>Hello {loggedin_screenname}</h1>
<h2>Welcome to {app_title}.</h2>
<!-- ENDIF -->
</div>
</td>
</tr>
<tr>
<td class="page" style="padding: 0px 10px 0px 10px" valign="top">
<table cellspacing="0" cellpadding="0" width="760px">
<tr>
<td valign="top" style="width: 180px">
<div id="usermenu">
<!-- IF loggedin == "0" -->
<div id="loginbox">
<form method="post" name="loginform" action="{virtual_path}{ifelse:system_enable_fancy_urls,"1","login/index.html","index.php?m=login"}">
<table cellspacing="0" cellpadding="0" class="loginbox">
<tr><td>Логин:</td></tr>
<tr><td><input maxlength="24" size="10" style="width: 140px;" type="text" name="username" value="" class="inputText" /></td></tr>
<tr><td>Пароль:</td></tr>
<tr><td><input maxlength="24" size="10" style="width: 140px;" type="password" name="password" value="" class="inputText" /></td></tr>
<tr><td>Запомнить?</td></tr>
<tr><td><select name="nonxpcookie" class="inputCombo"><option value="1">Yes</option><option value="0">No</option></select></td></tr>
<tr><td><input type="submit" name="login" value="Login" class="inputLogin" /></td></tr>
<tr><td><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","lostpassword/index.html","index.php?m=lostpassword"}">Forgot password?</a></td></tr>
</table>
<input type="hidden" name="islogin" value="1" />
</form>
</div>
<!-- ELSE -->
<ul>
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","home/index.html","index.php?m=home"}" title="{lang:"core","usermenu_page"}">{lang:"core","usermenu_page"}</a></li>
<!-- IF system_enable_messaging == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","messages/index.html","index.php?m=messages"}" title="{lang:"core","usermenu_messages"}">{lang:"core","usermenu_messages"}<!-- IF loggedin_newmessages > "0" --> ({loggedin_newmessages})<!-- ENDIF --></a></li>
<!-- ENDIF -->
<!-- IF system_enable_guestbooks == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","guestbook/index.html","index.php?m=guestbook"}" title="{lang:"core","usermenu_guestbook"}">{lang:"core","usermenu_guestbook"}</a></li>
<!-- ENDIF -->
<!-- IF system_enable_blogs == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","blog/index.html","index.php?m=blog"}" title="{lang:"core","usermenu_blog"}">{lang:"core","usermenu_blog"}</a></li>
<!-- ENDIF -->
<!-- IF system_enable_pictures == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","pictures/index.html","index.php?m=pictures"}" title="{lang:"core","usermenu_pictures"}">{lang:"core","usermenu_pictures"}</a></li>
<!-- ENDIF -->
<!-- IF system_enable_videos == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","videos/index.html","index.php?m=videos"}" title="{lang:"core","usermenu_videos"}">{lang:"core","usermenu_videos"}</a></li>
<!-- ENDIF -->
<!-- IF system_enable_audio == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","audio/index.html","index.php?m=audio"}" title="{lang:"core","usermenu_audio"}">{lang:"core","usermenu_audio"}</a></li>
<!-- ENDIF -->
<!-- IF system_enable_favorites == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","favorites/index.html","index.php?m=favorites"}" title="{lang:"core","usermenu_favorites"}">{lang:"core","usermenu_favorites"}</a></li>
<!-- ENDIF -->
<!-- IF system_enable_visitors == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","visitors/index.html","index.php?m=visitors"}" title="{lang:"core","usermenu_visitors"}">{lang:"core","usermenu_visitors"}</a></li>
<!-- ENDIF -->
<!-- IF system_enable_blocked_members == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","blocked/index.html","index.php?m=blocked"}" title="{lang:"core","usermenu_blocked"}">{lang:"core","usermenu_blocked"}</a></li>
<!-- ENDIF -->
<!-- IF app_license == "commercial" -->
<!-- IF system_enable_upgrades == "1" -->
<!-- IF loggedin_can_upgrade_account == "1" -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","upgrade/index.html","index.php?m=upgrade"}" title="{lang:"core","usermenu_upgrade"}">{lang:"core","usermenu_upgrade"}</a></li>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- ENDIF -->
<li><a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","logout/index.html","index.php?m=logout"}" title="{lang:"core","usermenu_logout"}">{lang:"core","usermenu_logout"}</a></li>
</ul>
<!-- ENDIF -->
</div>
<div class="clear"></div>
<div style="height: 220px;"> </div>
</td>
<td valign="top" style="width: 580px">
<!-- IF app_message_type == "info" -->
<div id="info_message">{app_message}</div>
<!-- ELSEIF app_message_type == "error" -->
<div id="error_message">{app_message}</div>
<!-- ENDIF -->
|
|
|

27.12.2008, 18:18
|
|
Постоянный
Регистрация: 07.03.2008
Сообщений: 479
Провел на форуме: 791766
Репутация:
61
|
|
А есть пользователь добавляет сообщение в MySQL то переменную с сообщением как нужно фильтровать?
|
|
|

27.12.2008, 18:30
|
|
Участник форума
Регистрация: 24.11.2008
Сообщений: 205
Провел на форуме: 1123418
Репутация:
362
|
|
Byrger
http://ua2.php.net/mysql_real_escape_string
|
|
|

27.12.2008, 19:32
|
|
Постоянный
Регистрация: 07.03.2008
Сообщений: 479
Провел на форуме: 791766
Репутация:
61
|
|
В чём ошибка?
PHP код:
header("Location: index.php");
exit;
Выходит :
Warning: Cannot modify header information - headers already sent by (output started at S:\home\localhost\www\index.php:3) in S:\home\localhost\www\menu.php on line 4
Это я посто в начале страници разместил...
|
|
|

27.12.2008, 19:55
|
|
Участник форума
Регистрация: 24.11.2008
Сообщений: 205
Провел на форуме: 1123418
Репутация:
362
|
|
Byrger
в menu.php ты пытаешься вывести хедер, хотя уже выведены данные в index.php
|
|
|

27.12.2008, 20:57
|
|
Постоянный
Регистрация: 07.03.2008
Сообщений: 479
Провел на форуме: 791766
Репутация:
61
|
|
Так ладно, спасибку 1 тыкнул.
А смотрите если у меня есть формы:
<form action=index.php?str=otz method=post>
<input type=hidden name=".$a_row['id']." value=post>
<input type=submit value='Добавить'>
</form>
Формы стоятся циклом....меняется $a_row['id'] от 1 до .....
Нужно как-то сделать чтоб при нажатии кнопки запускалась функция "addMySQL"
Но функции передаваласть переменная которая в $a_row['id']
Но нужно достать это переменную не из $a_row['id'] а из скрытого поля....
|
|
|

27.12.2008, 21:42
|
|
Участник форума
Регистрация: 11.05.2008
Сообщений: 202
Провел на форуме: 420713
Репутация:
104
|
|
PHP код:
<?php
/* ********************************************************** */
/* ********************************************************** */
function sortfile($f1,$f2)
{
$fil = $f1;
if(file_exists($f1) )
{
$arr2 = array();
$fop = fopen($f1,"r") or die("Failed open file");
$ff = filesize($fil);
$arr = explode("\r\n", fread($fop,$ff));
$fil2 = $f2;
if(file_exists($f2) )
{
foreach($arr as $k => $v)
{
$wr = $v ;
$fils = fopen($f2,"a+") or die("Failed open file");
fwrite($fils, $wr);
print_r($wr);
}
fflush($fils);
echo "write";
fclose($fils);
}
}
}
echo sortfile("sort.txt","php.txt");
?>
Пишет ток послед строку из sort.txt
Текст такой
Mr Burnham said the government was looking at a number of possible new internet safeguards.
He said some content, such as clips of beheadings, was unacceptable and new standards of decency were needed.
He also plans to negotiate with the US on drawing up international rules for English language websites.
Mr Burnham, a father of three young children, believes internet service providers should offer child-friendly web access.
в пхп попадет ток
Mr Burnham said the government was looking at a number of possible new internet safeguards.He said some content, such as clips of beheadings, was unacceptable and new standards of decency were needed.He also plans to negotiate with the US on drawing up international rules for English language websites.Mr Burnham, a father of three young children, believes internet service providers should offer child-friendly web access.
Как сделать чтоб попадал весь текст при режиме r+?
Последний раз редактировалось DTW; 27.12.2008 в 21:55..
|
|
|

28.12.2008, 02:50
|
|
Он хакер.
Регистрация: 01.11.2008
Сообщений: 1,756
Провел на форуме: 6462214
Репутация:
3171
|
|
В общем вопрос необычный совсем....
Грубо говоря,есть ли способ,отследить,что юзер пришел по ссылке из БАТ(почтовый клиент)?Неужтоли он не передает своих параметров вообще? Реферер пустой от него наверно приходит,но возможно есть дургие пути?
|
|
|

28.12.2008, 02:57
|
|
Участник форума
Регистрация: 24.11.2008
Сообщений: 205
Провел на форуме: 1123418
Репутация:
362
|
|
Сообщение от m0Hze
В общем вопрос необычный совсем....
Грубо говоря,есть ли способ,отследить,что юзер пришел по ссылке из БАТ(почтовый клиент)?Неужтоли он не передает своих параметров вообще? Реферер пустой от него наверно приходит,но возможно есть дургие пути?
ссылка открывается в браузере, нету способа
|
|
|

28.12.2008, 03:01
|
|
Динозавр
Регистрация: 10.01.2008
Сообщений: 2,841
Провел на форуме: 9220514
Репутация:
3338
|
|
Сообщение от Byrger
Так ладно, спасибку 1 тыкнул.
А смотрите если у меня есть формы:
Формы стоятся циклом....меняется $a_row['id'] от 1 до .....
Нужно как-то сделать чтоб при нажатии кнопки запускалась функция "addMySQL"
Но функции передаваласть переменная которая в $a_row['id']
Но нужно достать это переменную не из $a_row['id'] а из скрытого поля....
пост твой конечно очень понятный, но ошибка номер раз:
<form action=index.php?str=otz method=post>
а надо, как минимум:
<form action="index.php?str=otz" method=post>
т.е. брать в кавычки адрес
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|