صقر شمر
03-13-2006, 06:01 PM
هذا الهاك يجعل بمقدور المشرفين وضع رقم سري لأي مشاركة بأي قسم بالمنتدي
ازرع هذه الأوامر بقاعده البيانات
SQL QUERIES
ALTER TABLE thread ADD (
password VARCHAR(50) NOT NULL DEFAULT ''
)
في لوحة التحكم تذهب الي اللغات و العبارات
ونختار العبارات و المرادفات ونختار اضافة عباره جديد
التصنيف: Front-End Error Messages
اسم المتغير : threadpasswordmissing
النص:
مشرف المنتدي قد وضع كلمة مرور لهذه المشاركه . ارجو وضع كلمة السر
$postvars
Contraseٌa: $thread[password]-$thread[threadid
التصنيف: Front-End Error Messages
اسم المتغير: threadpasswordincorrect
النص:
;كلمة السر التي ادخلتها غير صحيحة ز ارجو اعاده المحاوله
$postvars
Contraseٌa:
التصنيف: Front-End Error Messages
اسم المتغير: threadpasswordcorrect
النص:
تم ادخال الكله السريه بنجاح . ارجو الأنتظار حتي يتم تحويلك للمشاركة
التصنيف: Front-End Error Messages
اسم المتغير: noarchivepass
النص:
هذه المشاركة محميه بكلمة سر لايمكنك ان تطلع عليها من الأرشيف Clic here to view the original thread .
افتح ملف forumdisplay.php
ابحث عن
deletionlog.username AS del_username, deletionlog.reason AS del_reason") . "
أضف بعده
, thread.password
افتح ملف functions.php
ابحث عن
// ###################### Start checkforumpwd #######################
اضف فوقه
// ###################### Start check thread password netzoner #######################
function verify_thread_password($forumid, $threadid, $password, $showerror = true)
{
global $permissions, $bbuserinfo, $stylevar, $scriptpath;
if (!$password OR ($permissions['adminpermissions'] & CANCONTROLPANEL) OR ($permissions['adminpermissions'] & ISMODERATOR) OR can_moderate($forumid))
{
return true; //Si es Administrador, Super Moderador o Moderador, pasa por alto la contraseٌa
}
if ($temp = fetch_bbarray_******('threadpwd', $threadid) AND $temp == md5($bbuserinfo['userid'] . $password))
{
return true;
}
// didn't match the password in any ******
if ($showerror)
{
// thread password is bad - show error
$postvars = construct_post_vars_html();
eval(print_standard_error('error_threadpasswordmis sing'));
}
else
{
// thread password is bad - return false
return false;
}
}
افتح ملف showthread.php
ابحث عن
// ************************************************** *******************************
// check if there is a forum password and if so, ensure the user has it set netzoner
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف فوقه
// ############################### start enter password ###############################
if ($_REQUEST['do'] == 'doenterpwd')
{
globalize($_REQUEST, array('forumid' => INT, 'threadid' => INT, 'newthreadpwd' => STR, 'url' => STR, 'postvars'));
if ($thread['password'] == $newthreadpwd)
{
// set a temp ****** for guests
if (!$bbuserinfo['userid'])
{
set_bbarray_******('threadpwd', $thread['threadid'], md5($bbuserinfo['userid'] . $newthreadpwd));
}
else
{
set_bbarray_******('threadpwd', $thread['threadid'], md5($bbuserinfo['userid'] . $newthreadpwd), 1);
}
$url = "showthread.php?$session[sessionurl]t=$thread[threadid]";
// Allow POST based redirection...
if ($postvars)
{
$temp = unserialize($postvars);
if ($temp['do'] != 'doenterpwd')
{ // ...but prevent an infinite loop
$postvars = construct_hidden_var_fields($postvars);
$formfile = $url;
}
else
{
$postvars = '';
}
}
eval(print_standard_redirect('threadpasswordcorrec t'));
}
else
{
$postvars = construct_post_vars_html();
eval(print_standard_error('threadpasswordincorrect '));
}
}
// Verify if the thread has a password
verify_thread_password($thread['forumid'], $thread['threadid'], $thread['password'], $showerror = true);
افتح ملف newreply.php
ابحث عن
[// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف فوقه
// Verify if the thread has a password
verify_thread_password($threadinfo['forumid'], $threadinfo['threadid'], $thread['password'], $showerror = true);
افتح ملف showpost.php
ابحث عن
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف بعده
// Verify if the thread has a password netzoner
verify_thread_password($threadinfo['forumid'], $threadinfo['threadid'], $thread['password'], $showerror = true);
افتح ملف archive/index.php
ابحث عن
$threadinfo = fetch_threadinfo($t);
اضف بعده
if($threadinfo['password'])
{
eval('$error_message = "' . fetch_phrase('error_noarchivepass', PHRASETYPEID_ERROR, 'error_') . '";');
$do = 'error';
}
افتح ملف printhread.php
ابحث عن
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف فوقه
// Verify if the thread has a password
verify_thread_password($threadinfo['forumid'], $threadinfo['threadid'], $thread['password'], $showerror = true);
افتح ملف sendmessage.php
ابحث عن
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف فوقه
// Verify if the thread has a password
verify_thread_password($threadinfo['forumid'], $threadinfo['threadid'], $thread['password'], $showerror = true);
يتبع
ازرع هذه الأوامر بقاعده البيانات
SQL QUERIES
ALTER TABLE thread ADD (
password VARCHAR(50) NOT NULL DEFAULT ''
)
في لوحة التحكم تذهب الي اللغات و العبارات
ونختار العبارات و المرادفات ونختار اضافة عباره جديد
التصنيف: Front-End Error Messages
اسم المتغير : threadpasswordmissing
النص:
مشرف المنتدي قد وضع كلمة مرور لهذه المشاركه . ارجو وضع كلمة السر
$postvars
Contraseٌa: $thread[password]-$thread[threadid
التصنيف: Front-End Error Messages
اسم المتغير: threadpasswordincorrect
النص:
;كلمة السر التي ادخلتها غير صحيحة ز ارجو اعاده المحاوله
$postvars
Contraseٌa:
التصنيف: Front-End Error Messages
اسم المتغير: threadpasswordcorrect
النص:
تم ادخال الكله السريه بنجاح . ارجو الأنتظار حتي يتم تحويلك للمشاركة
التصنيف: Front-End Error Messages
اسم المتغير: noarchivepass
النص:
هذه المشاركة محميه بكلمة سر لايمكنك ان تطلع عليها من الأرشيف Clic here to view the original thread .
افتح ملف forumdisplay.php
ابحث عن
deletionlog.username AS del_username, deletionlog.reason AS del_reason") . "
أضف بعده
, thread.password
افتح ملف functions.php
ابحث عن
// ###################### Start checkforumpwd #######################
اضف فوقه
// ###################### Start check thread password netzoner #######################
function verify_thread_password($forumid, $threadid, $password, $showerror = true)
{
global $permissions, $bbuserinfo, $stylevar, $scriptpath;
if (!$password OR ($permissions['adminpermissions'] & CANCONTROLPANEL) OR ($permissions['adminpermissions'] & ISMODERATOR) OR can_moderate($forumid))
{
return true; //Si es Administrador, Super Moderador o Moderador, pasa por alto la contraseٌa
}
if ($temp = fetch_bbarray_******('threadpwd', $threadid) AND $temp == md5($bbuserinfo['userid'] . $password))
{
return true;
}
// didn't match the password in any ******
if ($showerror)
{
// thread password is bad - show error
$postvars = construct_post_vars_html();
eval(print_standard_error('error_threadpasswordmis sing'));
}
else
{
// thread password is bad - return false
return false;
}
}
افتح ملف showthread.php
ابحث عن
// ************************************************** *******************************
// check if there is a forum password and if so, ensure the user has it set netzoner
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف فوقه
// ############################### start enter password ###############################
if ($_REQUEST['do'] == 'doenterpwd')
{
globalize($_REQUEST, array('forumid' => INT, 'threadid' => INT, 'newthreadpwd' => STR, 'url' => STR, 'postvars'));
if ($thread['password'] == $newthreadpwd)
{
// set a temp ****** for guests
if (!$bbuserinfo['userid'])
{
set_bbarray_******('threadpwd', $thread['threadid'], md5($bbuserinfo['userid'] . $newthreadpwd));
}
else
{
set_bbarray_******('threadpwd', $thread['threadid'], md5($bbuserinfo['userid'] . $newthreadpwd), 1);
}
$url = "showthread.php?$session[sessionurl]t=$thread[threadid]";
// Allow POST based redirection...
if ($postvars)
{
$temp = unserialize($postvars);
if ($temp['do'] != 'doenterpwd')
{ // ...but prevent an infinite loop
$postvars = construct_hidden_var_fields($postvars);
$formfile = $url;
}
else
{
$postvars = '';
}
}
eval(print_standard_redirect('threadpasswordcorrec t'));
}
else
{
$postvars = construct_post_vars_html();
eval(print_standard_error('threadpasswordincorrect '));
}
}
// Verify if the thread has a password
verify_thread_password($thread['forumid'], $thread['threadid'], $thread['password'], $showerror = true);
افتح ملف newreply.php
ابحث عن
[// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف فوقه
// Verify if the thread has a password
verify_thread_password($threadinfo['forumid'], $threadinfo['threadid'], $thread['password'], $showerror = true);
افتح ملف showpost.php
ابحث عن
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف بعده
// Verify if the thread has a password netzoner
verify_thread_password($threadinfo['forumid'], $threadinfo['threadid'], $thread['password'], $showerror = true);
افتح ملف archive/index.php
ابحث عن
$threadinfo = fetch_threadinfo($t);
اضف بعده
if($threadinfo['password'])
{
eval('$error_message = "' . fetch_phrase('error_noarchivepass', PHRASETYPEID_ERROR, 'error_') . '";');
$do = 'error';
}
افتح ملف printhread.php
ابحث عن
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف فوقه
// Verify if the thread has a password
verify_thread_password($threadinfo['forumid'], $threadinfo['threadid'], $thread['password'], $showerror = true);
افتح ملف sendmessage.php
ابحث عن
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
اضف فوقه
// Verify if the thread has a password
verify_thread_password($threadinfo['forumid'], $threadinfo['threadid'], $thread['password'], $showerror = true);
يتبع