PDA

View Full Version : دیکد کردن



meysammoezi
چهارشنبه 29 خرداد 1392, 15:24 عصر
با سلام من هرچی سعی کردن چند تا فایل php رو دیکد کنم نتونستم و به مشکل برخوردم حالا ازتون درخواست داشتم 3 تا فایل من رو بی زحمت دیکد کنید.
فایل زیپ105803 با تشکر از زحماتتون:تشویق:

meysammoezi
شنبه 01 تیر 1392, 18:38 عصر
دوستان من به این فایل ها نیاز دارم.
دو نوع کد توش وجود داره هرمقدارش که امکان داره رو لطفا برام دیکد کنیم.ممنون

meysammoezi
یک شنبه 02 تیر 1392, 09:58 صبح
دوستان اگه می تونید بهم کمک کنید یه پروژه دارم که باید تموم کنم. اگه آموزش دیکدش رو هم بزارید ممنون میشم

mehdiv
یک شنبه 02 تیر 1392, 16:27 عصر
سلام میتونید از برنامه نویسش درخواستش کنید
به دلیل داشتن کپی رایت و درخواست برنامه نویس نمیتونم واستون کدش رو بزارم
اما این اطلاعات برنامه نویس هست که در کد ذکر شده


// Translated By Mohammad Yekta (Mohammad.1ta@Gmail.Com)

meysammoezi
یک شنبه 02 تیر 1392, 17:02 عصر
دوست عزیز این فایل ها مربوط به یک ماژول فرم ساز روسیه که ترجمه شده بنده هم هزینه ترجه رو (50هزار تومن)پرداخت کردم حالا می خوام یه سری تغیرات توی فایل بدم. قصد دزدی هم ندارم شخص مترجم هم حاضر به همکاری نیست

meysammoezi
سه شنبه 04 تیر 1392, 10:33 صبح
می دونم کار سختیه ولی من نیازشون دارم
اگه امکانش هست آموزشش رو بزارید تا من مزاحم وقت انجمن نشم

meysammoezi
سه شنبه 22 مرداد 1392, 12:11 عصر
اگه کسی میتونه کمک کنه
هزینه هم اگه داشته باشه تقدیم می کنم

a_ahmadi
سه شنبه 22 مرداد 1392, 20:32 عصر
form.php

<?php
// Datalife Engine Farsi v7.3
// DLE Site: Www.DatalifeCMS.IR
// DLE Templates: Www.DLE-Temp.Com
// Translated By Mohammad Yekta (Mohammad.1ta@Gmail.Com)
if(!defined('DATALIFEENGINE'))
{
die("Hacking attempt!");
}

require_once(ROOT_DIR.'/language/'.$config['langs'].'/frmgen.lng');
include_once ENGINE_DIR.'/classes/form.class.php';
if (check_gfl()) {

include_once ENGINE_DIR.'/classes/parse.class.php';

$parse = new ParseFilter(Array(), Array(), 1, 1);
$parse->allow_php = true;

$stop_pm = FALSE;

if (isset($_POST['id']) AND !$stop_pm) {
$error ="";
$table_info_result = $db->super_query("SELECT frm_showcode FROM " . PREFIX . "_forminfo where id='$frm_id'");
if ($table_info_result['frm_showcode'] == "1") {
$sec_code = $_POST['sec_code'];
$sec_code_session = ($_SESSION['sec_code_session'] != '') ? $_SESSION['sec_code_session'] : false;

if ( $sec_code != $sec_code_session OR !$sec_code_session) {$error = $lang['476']; $stop_pm = TRUE;}
}

$_TIME = time()+($config['date_adjust']*60);
if (isset($_GET['fid'])){
$id = $db->safesql(htmlspecialchars($_REQUEST['frm']));
$fid = intval($db->safesql(stripslashes($_REQUEST['fid'])));
}else {
$ua=getBrowser();
$user_agn = $ua['name'] . " " . $ua['version'];
$ip = $db->safesql($_SERVER['REMOTE_ADDR']);
}
$frm_id = intval($_POST['id']);

$table_info = $db->super_query("SELECT frm_address, frm_title, frm_mail, frm_table, frm_align FROM " . PREFIX . "_forminfo where id='$frm_id'");
//$table_inf = $db->super_query("SELECT fi.id, fi.frm_address, fi.frm_title, fi.frm_mail, fi.frm_table, fi.frm_align, ff.form_id, ff.funiq, ff.title_en FROM " . PREFIX . "_forminfo fi
// LEFT JOIN " . PREFIX . "_formfildes ff ON fi.id=ff.form_id WHERE fi.frm_address='{$id}' AND ff.funiq='1' ORDER BY fi.id ASC", true);
//$uniq_count = $db->super_query("SELECT count(id) as count FROM " . PREFIX . "_{$table_inf['frm_table']} where id='$frm_id' ORDER BY id ASC");

trim($db->safesql(htmlspecialchars($_POST["{$table_n['title_en']}"])));

$frm_align = explode("|", $table_info['frm_align']);

if (!$error) {
$table_content = array(); $frm_title_fa = array();
if (isset($_GET['fid'])) $updateF = "UPDATE " . PREFIX . "_{$table_info['frm_table']} SET";
else $inserF = "INSERT INTO " . PREFIX . "_{$table_info['frm_table']} (id, ";
//$inserF = "INSERT INTO " . PREFIX . "_{$table_info['frm_table']} (id, ";
$mailContent ="<table align='$frm_align[0]' cellpadding='0' cellspacing='0' width='100%' dir='$frm_align[1]' style='font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: x-small'>\n
<tr><td colspan='2' height='40'>&nbsp;{$lang['480']}&nbsp;<font color='#000080'>{$table_info['frm_title']}</font></td></tr>\r\n";
$db->query("SELECT ftype, title_fa, title_en, fsize2, fselectop, fvalue FROM " . PREFIX . "_formfildes where form_id='$frm_id'");
$count = $db->num_rows();
$a=0;
while($table_n = $db->get_row()){

$a++;
if (!isset($_GET['fid'])){
$inserF .= ($count == $a) ? "{$table_n['title_en']}, user_name, user_agnt, user_ip, date, view_info) VALUES ('', " : "{$table_n['title_en']}, ";
array_push($frm_title_fa, "{$table_n['title_fa']}");
}
if ($table_n['ftype'] == "textarea"){

$fulltext = $db->safesql($parse->BB_Parse($parse->process(str_replace("\r\n", "<br />", $_POST["{$table_n['title_en']}"]))));
if (isset($_GET['fid'])) $updateF .= ($count != $a) ? " {$table_n['title_en']}='$fulltext'," : " {$table_n['title_en']}='$fulltext' WHERE id='$fid'";

array_push($table_content, $fulltext);
}

elseif ($table_n['ftype'] == "file_upload" && $_FILES["{$table_n['title_en']}"]["name"] !="") {
if (!is_dir(ROOT_DIR."/uploads/form_{$table_info['frm_address']}")){
@mkdir(ROOT_DIR."/uploads/form_{$table_info['frm_address']}", 0777);
copy(ROOT_DIR."/backup/index.html",ROOT_DIR."/uploads/form_{$table_info['frm_address']}/index.html");
}
$file = $_FILES["{$table_n['title_en']}"]["tmp_name"];
$file_allname = $_FILES["{$table_n['title_en']}"]["name"];
$file_size = $_FILES["{$table_n['title_en']}"]["size"];
$file_name_arr = explode(".", strtolower($file_allname));

$type = totranslit(end($file_name_arr));
$file_name = totranslit(substr(strtolower(stripslashes($file_na me_arr[0])),0,3)).substr($_TIME,5).$a;

$allowed_extensions = ($table_n['fselectop'] !="") ? explode("|", trim($table_n['fselectop'])) : array("jpg", "png", "jpe", "jpeg", "gif", "bmp", "zip", "7z", "pdf", "xsl", "doc", "ppt", "swf", "mp3", "avi");

if (!in_array($type, $allowed_extensions)) {$error = $lang['485'].$filde_name; $stop_pm = TRUE;}

$allowed_size = ($table_n['fsize2'] !="") ? intval($table_n['fsize2'])*1024 : intval($config['max_file_size']);

if ($file_size > $allowed_size) {$error = $lang['486'].$filde_name; $stop_pm = TRUE;}
if (file_exists(ROOT_DIR."/uploads/form_".$table_info['frm_address']."/".$table_info['frm_address']."_".$file_name.".".$type))
{$error = $lang['487']; $stop_pm = TRUE;}

if (!$error) {
if(is_uploaded_file($file)) {
@move_uploaded_file($file, ROOT_DIR."/uploads/form_".$table_info['frm_address']."/".$table_info['frm_address']."_".$file_name.".".$type);
$path = "<a href=\"".$config['http_home_url']."uploads/form_".$table_info['frm_address']."/".$table_info['frm_address']."_".$file_name.".".$type."\" target=\"_blank\" />".$table_info['frm_address']."_".$file_name.".".$type."</a>";
if (isset($_GET['fid'])) $updateF .= ($count != $a) ? " {$table_n['title_en']}='$path'," : " {$table_n['title_en']}='$path' WHERE id='$fid'";
else array_push($table_content, $path);
}
}else {msgbox ($lang['475'], "<ul>".$error."</ul><br><br><a href='javascript:history.go(-1)'>{$lang['481']}</a>"); $stop_pm = TRUE;}

}elseif ($table_n['ftype'] == "select" || $table_n['ftype'] == "radio") {

$selectFilde = explode("|", trim($table_n['fselectop']));
foreach ($selectFilde AS $selF) {
$sfilde = explode(":", trim($selF));
if ($_POST["{$table_n['title_en']}"] == $sfilde[0])
if (isset($_GET['fid'])) $updateF .= ($count != $a) ? " {$table_n['title_en']}='".trim($sfilde[1])."'," : " {$table_n['title_en']}='".trim($sfilde[1])."' WHERE id='$fid'";
else array_push($table_content, trim($sfilde[1]));
}

}else{
$field = trim($db->safesql(htmlspecialchars($_POST["{$table_n['title_en']}"])));
if (isset($_GET['fid'])) $updateF .= ($count != $a) ? " {$table_n['title_en']}='$field'," : " {$table_n['title_en']}='$field' WHERE id='$fid'";
else array_push($table_content,$field);
}

}

}else {msgbox ($lang['475'], "<ul>".$error."</ul><br><br><a href='javascript:history.go(-1)'>{$lang['481']}</a>"); $stop_pm = TRUE;}

if (!$error) {
if (!isset($_GET['fid'])){
$tableCount = count($table_content) -1;

if ($db->safesql($_POST['formtype']) == "onlyBank" || $db->safesql($_POST['formtype']) == "mailBank") {
for ($i=0; $i <= $tableCount; $i++)
$inserF .= ($tableCount == $i) ? "'$table_content[$i]', '{$member_id['name']}', '$user_agn', '$ip', '$_TIME', '0')" : "'$table_content[$i]', ";

$db->query($inserF);
if ($db->safesql($_POST['formtype']) == "onlyBank"){
$db->query("UPDATE " . PREFIX . "_forminfo SET frm_fill=frm_fill+1 WHERE id='$frm_id'");
msgbox ($lang['478'], "<ul>".$lang['477']."</ul><br><br><a href='javascript:history.go(-1)'>{$lang['481']}</a>");
$stop_pm = TRUE;}
}

if ($db->safesql($_POST['formtype']) == "onlyMail" || $db->safesql($_POST['formtype']) == "mailBank") {

$user_name = ($member_id['name'] !="") ? "<a href=\"".$config['http_home_url']."user/{$member_id['name']}/\" title=\"{$lang['496']} : {$member_id['name']}\">{$member_id['name']}</a>" : "{$lang['507']}";

for ($i=0; $i <= $tableCount; $i++) {
$mailContent .=($tableCount != $i) ? "<tr><td>&nbsp;$frm_title_fa[$i]</td>\r\n
<td height='30'>&nbsp;$table_content[$i]</td></tr>\r\n" :
"<tr><td width='20%'>&nbsp;$frm_title_fa[$i]</td>\r\n
<td height='30'>&nbsp;$table_content[$i]</td></tr>\r\n
<tr><td width='20%'>&nbsp;{$lang['496']}</td>\r\n
<td height='30'>&nbsp;$user_name</td></tr>\r\n
<tr><td width='20%'>&nbsp;{$lang['482']}</td>\r\n
<td height='30'>&nbsp;".jdate("j F Y H:i", $_TIME)."</td></tr>\r\n
<tr><td width='20%'>&nbsp;{$lang['483']}</td>\r\n
<td height='30'>&nbsp;$ip</td></tr>\r\n
<tr><td width='20%'>&nbsp;{$lang['484']}</td>\r\n
<td height='30'>&nbsp;$user_agn</td></tr>\r\n</table>";
}
//-------------------------------------------------------
$subject= "Email From Site - Form Generation : {$table_info['frm_title']}";

include_once ENGINE_DIR.'/classes/mail.class.php';
$mail = new dle_mail ($config, TRUE);

$mail->send($table_info['frm_mail'], $subject, $mailContent);
$db->query("UPDATE " . PREFIX . "_forminfo SET frm_fill=frm_fill+1 WHERE id='$frm_id'");
if ($mail->send_error) {msgbox ($lang['475'], $mail->smtp_msg); $stop_pm = TRUE;}
else{
msgbox ($lang['478'], "<ul>".$lang['477']."</ul><br><br><a href='javascript:history.go(-1)'>{$lang['481']}</a>");
$stop_pm = TRUE;}

}

}else{
$db->query($updateF);
msgbox ($lang['478'], "<ul>".$lang['513']."</ul><br><br><a href='javascript:history.go(-1)'>{$lang['481']}</a>");
$stop_pm = TRUE;
}

}


}
$js_array[] = "engine/skins/calendar.js";
$js_array[] = "engine/skins/calendar-fa.js";
$js_array[] = "engine/skins/calendar-setup.js";
$js_array[] = "engine/skins/jalali.js";

$id = $db->safesql(htmlspecialchars($_REQUEST['frm']));
$fid = intval($db->safesql(stripslashes($_REQUEST['fid'])));

if (!$form_result['id'])
$_TIME = time()+($config['date_adjust']*60);
$form_result = $db->super_query("SELECT * FROM " . PREFIX . "_forminfo WHERE frm_sdate <= '$_TIME' AND (frm_edate ='0000-00-00' || frm_edate >= '$_TIME') AND frm_address='$id'");

if($form_result['frm_access']){
$form_result['frm_access'] = explode (',', $form_result['frm_access']);

if ($form_result['frm_access'][0] != "all" AND !in_array($member_id['user_group'], $form_result['frm_access'])) { msgbox ($lang['475'], $lang['495']); $stop_pm = TRUE;}
}

if ($form_result['id'] AND !$stop_pm) {

$db->query("UPDATE " . PREFIX . "_forminfo SET frm_show=frm_show+1, frm_lastvisit='$_TIME' WHERE id='{$form_result['id']}'");

$template = stripslashes($form_result['frm_template']);
$frm_align = explode("|", $form_result['frm_align']);

if ($form_result['frm_selecttpl']) {

if ($form_result['frm_selecttpl'] != '' ) $tpl->load_template('form.tpl'); else $tpl->load_template($form_result['frm_template'].'.tpl');

$errorHandel = "<script language='JavaScript' type='text/javascript'>
function reload () {
var rndval = new Date().getTime();
document.getElementById('dle-captcha').innerHTML = '<img src=\"{$path['path']}engine/modules/antibot.php?rndval=' + rndval + '\" alt=\"${lang['467']}\" border=\"0\" width=\"120\" height=\"50\"><br /><a onclick=\"reload(); return false;\" href=\"#\">{$lang['469']}</a>';
};
function check_reg_daten () {";

$formFildes = "\n<table align=\"$frm_align[0]\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" dir=\"$frm_align[1]\" style=\"font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px\">\n";
$saroman=$db->query("SELECT * FROM " . PREFIX . "_{$form_result['frm_table']} WHERE id='{$fid}'");
$prows = $db->get_row($saroman);

$db->query("SELECT * FROM " . PREFIX . "_formfildes where form_id='{$form_result['id']}' ORDER BY id ASC");
$a = 1;
while($row = $db->get_row()){

$req = $row['freq'] =="1" ? " <font color='#ff0000'>*</font>" : "";
$checked = ($row['freq'] =="1" && $row['ftype'] == "checkbox") ? " checked" : "";
$desc = $row['fdesc'] !="" ? "<br /><span style='font-family:Tahoma;font-size:11px;color:#8A8A8A;text-align:justify;'>{$row['fdesc']}</span>" : "";
$row['fsize1'] = $row['fsize1'] =="" ? "20" : $row['fsize1'];
$value = $prows !="" ? $prows[$row['title_en']] : $row['fvalue'];
$fsize2 = $row['fsize2'] == 0 ? "" : "maxlength='".$row['fsize2']."' ";
if ($row['ftype'] == "checkbox")
$formFildes .= "<tr><td width='25%'>&nbsp;</td>
<td height='30' width='75%'>&nbsp;<input type='checkbox' name='{$row['title_en']}' value='1'$checked>&nbsp;{$row['title_fa']}</td></tr>\r\n";
elseif ($row['ftype'] == "text")
$formFildes .= "<tr><td width='25%'>&nbsp;{$row['title_fa']}$req$desc</td>
<td height='30' width='75%'>&nbsp;<input type='text' name='{$row['title_en']}' value='$value' size='{$row['fsize1']}' {$fsize2}class='f_input' dir='$frm_align[1]'></td></tr>\r\n";
elseif ($row['ftype'] == "date")
$formFildes .= "<tr><td width='25%'>&nbsp;{$row['title_fa']}$req$desc</td>
<td height='30' width='75%'>&nbsp;<input type='text' name='{$row['title_en']}' id='{$row['title_en']}' value='$value' size='{$row['fsize1']}' {$fsize2}class='f_input' dir='ltr'>
<img src='engine/skins/images/img.gif' align='absmiddle' id='".$row['title_en'].$a."' style='cursor: pointer; border: 0' title='{$lang['edit_ecal']}'/>
<link rel='stylesheet' type='text/css' media='all' href='engine/skins/calendar-blue.css' title='win2k-cold-1' />
<script type='text/javascript'>
Calendar.setup({
inputField : '{$row['title_en']}', // id of the input field
ifFormat : '%Y-%m-%d', // format of the input field
button : '".$row['title_en'].$a."', // trigger for the calendar (button ID)
align : 'Br', // alignment
timeFormat : '24',
dateType : 'jalali',
showsTime : true,
singleClick : true
});
</script></td></tr>\r\n";
elseif ($row['ftype'] == "num") {
$formFildes .= "<tr><td width='25%'>&nbsp;{$row['title_fa']}$req$desc</td>
<td height='30' width='75%'>&nbsp;<input type='text' name='{$row['title_en']}' value='$value' size='{$row['fsize1']}' {$fsize2}class='f_input' dir='ltr'></td></tr>\r\n";
$errorHandel .= "\r\nvar numericExpression = /^[0-9]+$/;
if (!document.forms.form{$form_result['id']}.{$row['title_en']}.value.match(numericExpression) || document.forms.form{$form_result['id']}.{$row['title_en']}.value.length < {$row['fsize2']}) {
alert('{$lang['561']}');
form{$form_result['id']}.{$row['title_en']}.focus()
return false;
}";
}elseif ($row['ftype'] == "email")
$formFildes .= "<tr><td width='25%'>&nbsp;{$row['title_fa']}$req$desc</td>
<td height='30' width='75%'>&nbsp;<input type='text' name='{$row['title_en']}' value='$value' size='{$row['fsize1']}' class='f_input' dir='ltr'></td></tr>\r\n";
elseif ($row['ftype'] == "password")
$formFildes .= "<tr><td width='25%'>&nbsp;{$row['title_fa']}$req$desc</td>
<td height='30' width='75%'>&nbsp;<input type='password' name='{$row['title_en']}' value='$value' size='{$row['fsize1']}' {$fsize2}class='f_input' dir='ltr'></td></tr>\r\n";
elseif ($row['ftype'] == "radio"){
$formFildes .= "<tr><td height='30'>&nbsp;{$row['title_fa']}$req$desc</td><td>";
$radioF = explode("|", trim($row['fselectop']));
foreach ($radioF AS $rf) {
$rfi = explode(":", trim($rf));
if ($row['fvalue'] != "" && $row['fvalue'] == $rfi[0]) $checked_r = " checked"; else $checked_r = "";
$formFildes .= "&nbsp;<input type='radio' name='{$row['title_en']}' value='$rfi[0]'$checked_r />&nbsp;$rfi[1]<br />";
}
$formFildes .= "</td></tr>\r\n";
}
elseif ($row['ftype'] == "select"){
$formFildes .= "<tr><td height='30' width='25%'>&nbsp;{$row['title_fa']}$req$desc</td><td width='75%'>&nbsp;<select name='{$row['title_en']}' dir='$frm_align[1]'>\r\n";
$selectF = explode("|", trim($row['fselectop']));
foreach ($selectF AS $sf) {
$sfi = explode(":", trim($sf));
if ($row['fvalue'] != "" && $row['fvalue'] == $sfi[0]) $selected = " selected"; else $selected = "";
$formFildes .= "<option value='$sfi[0]'$selected>$sfi[1]</option>\r\n";
}
$formFildes .= "</select></td></tr>\r\n";
}
elseif ($row['ftype'] == "textarea"){
$formFildes .= "<tr><td width='25%'>&nbsp;{$row['title_fa']}$req$desc</td>";
if ($row['fselectop'] != "") $rules = $row['fselectop'];
$lord = $prows !="" ? $parse->decodeBBCodes(str_replace("<br />", "\r\n",$prows[$row['title_en']])) : $rules;
$formFildes .= "<td width='75%'><br />&nbsp;<textarea name='{$row['title_en']}' cols='{$fsize2}' rows='{$row['fsize1']}' style='font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; background-color: FBFBFB; border:1px solid #E0E0E0;' dir='$frm_align[1]'>$lord</textarea><br /></td></tr>\r\n";
}
elseif ($row['ftype'] == "file_upload")
$formFildes .= "<tr height='30'><td width='25%'>&nbsp;{$row['title_fa']}$req$desc</td>
<td width='75%'>&nbsp;<input type='file' name='{$row['title_en']}' style='width:304px; height:18px' class='f_input' dir='ltr' /></td></tr>\r\n";
elseif ($row['ftype'] == "hidden") $formFildes .= "<input type='hidden' name='{$row['title_en']}' value='$value'>\r\n";

if ($row['freq'] =="1") {
if ($row['ftype'] !="email" AND $row['ftype'] !="password")
$errorHandel .= "\r\nif(document.forms.form{$form_result['id']}.{$row['title_en']}.value == '') {
alert('{$lang['441']}');
form{$form_result['id']}.{$row['title_en']}.focus()
return false;
}";
elseif ($row['ftype'] =="email")
$errorHandel .= "\r\nif(document.forms.form{$form_result['id']}.{$row['title_en']}.value == '') {
alert('{$lang['441']}');
form{$form_result['id']}.{$row['title_en']}.focus()
return false;
}

if (!(/[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+/.test(document.forms.form{$form_result['id']}.{$row['title_en']}.value))) {
alert('{$lang['470']}');
form{$form_result['id']}.{$row['title_en']}.focus()
return false;
}";
elseif ($row['ftype'] !="password" )
$errorHandel .= "\r\nif(document.forms.form{$form_result['id']}.password1.value.length < 6) {
alert('{$lang['reg_err_31']}');
form{$form_result['id']}.password1.focus()
return false;
}

if(document.forms.form{$form_result['id']}.password1.value != document.forms.form{$form_result['id']}.password2.value) {
alert('{$lang['reg_err_32']}');
form{$form_result['id']}.password1.focus()
return false;
}";
}
$a ++;
}

if ($form_result['frm_showcode'] == "1") {
$formFildes .= "<tr>
<td width='20%'>&nbsp;{$lang['467']}</td>
<td><br><span id='dle-captcha'><img src='".$path['path']."engine/modules/antibot.php' alt='${lang['467']}' border='0'><br /><a onclick='reload(); return false;' href='#'>{$lang['469']}</a></span></td>
</tr>
<tr>
<td height='30'>&nbsp;{$lang['468']} <font color='#ff0000'>*</font></td>
<td><input type='text' dir='ltr' name='sec_code' id='sec_code' style='width:120px; height:20px;' class='f_input'></td>
</tr>";
$errorHandel .= "\r\nif(document.forms.form{$form_result['id']}.sec_code.value =='') {
alert('{$lang['441']}');
form{$form_result['id']}.sec_code.focus()
return false;
}";

}

$errorHandel .= "return true;
};</script>";

if ($form_result['frm_mail'] !="" && $form_result['frm_table'] =="") $frmtype = "onlyMail";
elseif ($form_result['frm_table'] !="" && $form_result['frm_mail'] =="") $frmtype = "onlyBank";
elseif ($form_result['frm_table'] !="" && $form_result['frm_mail'] !="") $frmtype = "mailBank";

$formFildes .= "<tr>
<td height='30'>&nbsp;</td>
<td><br /><input type='submit' name='sendform' value='{$form_result['frm_button']}' style='font-family:Tahoma;font-size:12px; height:25px;'></td>
</tr></table>";


$tpl->set('{title}', $form_result['frm_title']);
$tpl->set('{bbcode}',$bb_code);
$tpl->set('{description}', $form_result['frm_desc']);
$tpl->set('{showform}', $formFildes);

$tpl->copy_template = "\n<form method=\"POST\" name=\"form{$form_result['id']}\" onsubmit=\"if (!check_reg_daten()) {return false;};\" enctype=\"multipart/form-data\" action=\"{$link_action}\">".$tpl->copy_template."
<input type='hidden' name='formtype' value='$frmtype' />
<input type='hidden' name='id' value='{$form_result['id']}' /></form>\n\n".$errorHandel;

$tpl->compile('content');
$tpl->clear();

} //else $tpl->result['content'] = $template;

} elseif (!$form_result['id']) {

@header("HTTP/1.0 404 Not Found");
msgbox ($lang['475'], $lang['479']."<br><br><a href='javascript:history.go(-1)'>{$lang['481']}</a>");


}

}else{
echo "<center><br><br><font color=\"#ff0000\"><b>{$lang['501']}</b></font></cente>";
die();
}

?>

a_ahmadi
سه شنبه 22 مرداد 1392, 20:36 عصر
frmgen.php
قسمت اول

<?php
// Parastoo LMS Farsi v7.3
// S.Mohammad Salehi (GreyZero.am@Gmail.com)

if(!defined('DATALIFEENGINE'))
{
die("Hacking attempt!");
}

require_once(ROOT_DIR.'/language/'.$config['langs'].'/frmgen.lng');
include_once ENGINE_DIR.'/classes/form.class.php';
if (check_gfl()) {

require_once(ENGINE_DIR.'/data/dbconfig.php');
include_once ENGINE_DIR.'/classes/parse.class.php';

$parse = new ParseFilter(Array(), Array(), 1, 1);
$parse->allow_php = true;

$stop_pm = FALSE;
if( ! $user_group[$member_id['user_group']]['admin_blockip'] ) {
msg( "error", $lang['index_denied'], $lang['index_denied'] );
}

include(ENGINE_DIR.'/inc/include/inserttag.php');

$action = trim($db->safesql(htmlspecialchars(filterchar($_GET['action']))));
$do = trim($db->safesql(htmlspecialchars(filterchar($_GET['do']))));


if (isset($_POST['createfrm']) AND !$stop_pm) {



$_TIME = time()+($config['date_adjust']*60);
$stDate = trim($db->safesql(htmlspecialchars(filterchar($_POST['frm_sdate']))));
$edDate = trim($db->safesql(htmlspecialchars(filterchar($_POST['frm_edate']))));

$startDate = $stDate !="" ? strtotime($stDate) : $_TIME;
$endDate = $edDate !="" ? strtotime($edDate) : "0000-00-00";

$frm_address = trim($db->safesql(htmlspecialchars(filterchar(str_replace(" ", "-", $_POST['frm_address'])))));
$frm_title = trim($db->safesql(htmlspecialchars($_POST['frm_title'])));
$frm_desc = $db->safesql($parse->BB_Parse($parse->process(str_replace("\r\n", "<br />",$_POST['frm_desc']))));
$frm_mail = trim($db->safesql(htmlspecialchars($_POST['frm_mail'])));

if (!preg_match("/^[\.A-z0-9_\-]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{1,4}$/", $frm_mail)) $frm_mail ="";

$frm_table_name = trim($db->safesql(htmlspecialchars(filterchar($_POST['frm_table_name']))));
$frm_button = trim($db->safesql(htmlspecialchars($_POST['frm_button'])));
$frm_align = trim($db->safesql(htmlspecialchars($_POST['frm_align'])));
$allow_captcha = intval ($_POST['allow_captcha']);
$frm_template = $parse->BB_Parse(filterchar($_POST['frm_template']));

if (!count($_POST['grouplevel'])) $_POST['grouplevel'] = array("all");
$grouplevel = $db->safesql(implode(',', $_POST['grouplevel']));

$allow_template = intval ($_POST['allow_template']);

if (!$action == "editfrm") {
$fminfo = $db->query("SELECT id FROM " . PREFIX . "_forminfo WHERE frm_address='$frm_address'");
$dat = $db->get_row();

if ($dat) {msg("error",$lang['475'],$lang['508'], "javascript:history.go(-1)"); $stop_pm = TRUE;}
}

if(!$stop_pm) {

$tableSchema = array();
$id = intval( $_GET['id'] );
if ($action == "editfrm" && $do == "info") {

$row = $db->super_query("SELECT frm_table FROM " . PREFIX . "_forminfo WHERE id='$id'");

$tableSchema[] = "UPDATE " . PREFIX . "_forminfo SET
frm_address='$frm_address',
frm_title='$frm_title',
frm_desc='$frm_desc',
frm_mail='$frm_mail',
frm_align='$frm_align',
frm_template='$frm_template',
frm_access='all',
frm_selecttpl='$allow_template',
frm_showcode='$allow_captcha'
WHERE id='$id'";

if (empty($frm_table_name)) {

$tableSchema[] = "DROP TABLE IF EXISTS " . PREFIX . "_{$row['frm_table']}";
$tableSchema[] = "UPDATE " . PREFIX . "_forminfo SET frm_table='' WHERE id='$id'";

}elseif (!empty($frm_table_name) && $frm_table_name != $row['frm_table']){

$tableSchema[] = "ALTER TABLE " . PREFIX . "_{$row['frm_table']} RENAME " . PREFIX . "_$frm_table_name";
$tableSchema[] = "UPDATE " . PREFIX . "_forminfo SET frm_table='$frm_table_name' WHERE id='$id'";

}

foreach($tableSchema as $table) {
$db->query($table) or die("Error:<b> ". mysql_error()." </b>in file <b>".'frmgen.php'."</b> on line <b>".__LINE__);
}

msg("info", $lang['478'], "<ul>".$lang['513']."</ul><br><br><a href='$PHP_SELF?mod=frmgen'>{$lang['481']}</a>");
$stop_pm = TRUE;

}elseif ($action == "newfrm") {
$db->query("INSERT INTO " . PREFIX . "_forminfo (frm_address, frm_title, frm_desc, frm_button, frm_mail, frm_table, frm_align, frm_template, frm_access, frm_selecttpl, frm_showcode, frm_ftname, frm_show, frm_fill, frm_sdate, frm_edate, frm_lastvisit)
values ('$frm_address', '$frm_title', '$frm_desc', '$frm_button', '$frm_mail', '$frm_table_name', '$frm_align', '$frm_template', '$grouplevel', '$allow_template', '', '', '', '$allow_captcha', '$startDate', '$endDate', '')");
}

}

if(!$stop_pm) {

$Creae_table = "CREATE TABLE " . PREFIX . "_".$frm_table_name."(id INT (11) UNSIGNED not null AUTO_INCREMENT,";
$ftname = "";

if (($action == "editfrm" && $do == "fileds") || $action == "newfrm") {
if ($action == "newfrm") $frmID = $db->super_query("SELECT id FROM " . PREFIX . "_forminfo WHERE frm_sdate=$_TIME");
$formID = ($action == "editfrm") ? $id : $frmID['id'];

if ($action == "editfrm")
$id = intval( $_GET['id'] );
$min_max = $db->super_query("SELECT max(id) AS MAX_ID, min(id) AS MIN_ID FROM " . PREFIX . "_formfildes WHERE form_id='$id'");

$error ="";
$key = "PRIMARY KEY (id)";
$min = ($action == "editfrm") ? $min_max['MIN_ID'] : 1;
$max = ($action == "editfrm") ? $min_max['MAX_ID'] : sizeof($_POST['title_en']);
$count = sizeof($_POST['title_en']);
for ($i=$min; $i <= $max; $i++) {
$req[$i] = intval($_POST['freq'][$i]);
$uniq[$i] = intval($_POST['funiq'][$i]);
$list[$i] = intval($_POST['flist'][$i]);
$ftype[$i] = trim($db->safesql($_POST['ftype'][$i]));
$title_fa[$i] = trim($db->safesql(filterchar($_POST['title_fa'][$i], TRUE)));
$title_en[$i] = trim($db->safesql(filterchar($_POST['title_en'][$i])));
$size1[$i] = intval($_POST['fsize1'][$i]);
$size2[$i] = intval($_POST['fsize2'][$i]);
$selectop[$i] = str_replace('\\r\\n', "|", trim($db->safesql($_POST['fselectop'][$i])));
$fvalue[$i] = trim($db->safesql(filterchar($_POST['fvalue'][$i])));
$fdesc[$i] = str_replace('\\r\\n', "<br />", trim($db->safesql($_POST['fdesc'][$i])));
if (!empty($frm_table_name) && $action == "newfrm") {
if($uniq[$i] == 1) $key .= ", UNIQUE KEY ".$title_en[$i]." (".$title_en[$i].")";
if ($ftype[$i] == "checkbox" && $title_en[$i] !="") $Creae_table .= $title_en[$i]." tinyint(2) NOT NULL default '0',";
elseif ($ftype[$i] == "text") $Creae_table .= $title_en[$i]." VARCHAR(250) NOT NULL DEFAULT '',";
elseif ($ftype[$i] == "date") $Creae_table .= $title_en[$i]." VARCHAR(40) NOT NULL DEFAULT '',";
elseif ($ftype[$i] == "num") $Creae_table .= $title_en[$i]." VARCHAR(30) NOT NULL DEFAULT '',";
elseif ($ftype[$i] == "email") $Creae_table .= $title_en[$i]." VARCHAR(150) NOT NULL DEFAULT '',";
elseif ($ftype[$i] == "password") $Creae_table .= $title_en[$i]." VARCHAR(30) NOT NULL DEFAULT '',";
elseif ($ftype[$i] == "radio") $Creae_table .= $title_en[$i]." tinyint(2) NOT NULL default '0',";
elseif ($ftype[$i] == "select") $Creae_table .= $title_en[$i]." VARCHAR(40) NOT NULL DEFAULT '',";
elseif ($ftype[$i] == "textarea") $Creae_table .= $title_en[$i]." text NOT NULL,";
elseif ($ftype[$i] == "file_upload") $Creae_table .= $title_en[$i]." VARCHAR(250) NOT NULL DEFAULT '',";
elseif ($ftype[$i] == "hidden") $Creae_table .= $title_en[$i]." VARCHAR(80) NOT NULL DEFAULT '',";
}

if ($action == "newfrm") {
if ($ftype[$i] != "" && $title_fa[$i] != "" && $title_en[$i] != ""){
$ftname .= $title_fa[$i].":".$title_en[$i];
$ftname .= ($i < $count && $title_en[$i] !="") ? "|" : "";
$db->query("INSERT INTO " . PREFIX . "_formfildes (form_id, freq, funiq, flist, ftype, title_fa, title_en, fsize1, fsize2, fselectop, fvalue, fdesc)
values ('$formID', '$req[$i]', '$uniq[$i]', '$list[$i]', '$ftype[$i]', '$title_fa[$i]', '$title_en[$i]', '$size1[$i]', '$size2[$i]', '$selectop[$i]', '$fvalue[$i]', '$fdesc[$i]')");
}
}
elseif ($action == "editfrm") {
$id = intval( $_GET['id'] );
if ($ftype[$i] == "" || $title_fa[$i] == "" || $title_en[$i] == "")
$db->query("DELETE FROM " . PREFIX . "_formfildes WHERE form_id='$id' AND id='$i'");
else

$ftname .= $title_fa[$i].":".$title_en[$i];
$ftname .= ($i < $max && $title_en[$i] !="") ? "|" : "";

$db->query("UPDATE " . PREFIX . "_formfildes SET
freq='$req[$i]',
funiq='$uniq[$i]',
flist='$list[$i]',
ftype='$ftype[$i]',
title_fa='$title_fa[$i]',
title_en='$title_en[$i]',
fsize1='$size1[$i]',
fsize2='$size2[$i]',
fselectop='$selectop[$i]',
fvalue='$fvalue[$i]',
fdesc='$fdesc[$i]'
WHERE form_id='$id' AND id='$i'");
}
}

if (!empty($frm_table_name) && $action == "newfrm") {
$Creae_table .= "user_name VARCHAR(40) NOT NULL DEFAULT '',
user_agnt VARCHAR(150) NOT NULL DEFAULT '',
user_ip VARCHAR(30) NOT NULL DEFAULT '',
date VARCHAR(20) NOT NULL default '',
view_info tinyint(1) NOT NULL default '0',
".$key."
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */";
$db->query("DROP TABLE IF EXISTS " . PREFIX . "_".$frm_table_name."");
$db->query($Creae_table) or die("Error:<b> ". mysql_error()." </b>in file <b>".'frmgen.php'."</b> on line <b>".__LINE__);
$db->query("UPDATE " . PREFIX . "_forminfo SET frm_table='$frm_table_name', frm_ftname='".$ftname."' WHERE id='$formID'");
}
if ($action == "editfrm" && $do == "fileds")
$db->query("UPDATE " . PREFIX . "_forminfo SET frm_ftname='".$ftname."' WHERE id='$formID'");
//die();
msg("info", $lang['478'], "<ul>".$lang['490']."</ul><br><br><a href='$PHP_SELF?mod=frmgen'>{$lang['481']}</a>");
$stop_pm = TRUE;
}
}
}

if ($action == "delete" AND !$stop_pm) {
$id = intval( $_GET['id'] );
if ($_REQUEST['user_hash'] == "" OR $_REQUEST['user_hash'] != $dle_login_hash)
die("Hacking attempt! User not found");

$tableSch = array();
$tableSch[] = "DELETE FROM " . PREFIX . "_formfildes WHERE form_id='$id' ";
$row = $db->super_query("SELECT frm_address, frm_table FROM " . PREFIX . "_forminfo WHERE id='$id'");
$direct = ROOT_DIR."/uploads/form_{$row['frm_address']}";

removeDirectory ($direct);

$tableSch[] = "DROP TABLE IF EXISTS " . PREFIX . "_{$row['frm_table']}";
$tableSch[] = "DELETE FROM " . PREFIX . "_forminfo WHERE id='$id' ";

foreach($tableSch as $tbl) {
$db->query($tbl) or die("Error:<b> ". mysql_error()." </b>in file <b>".'frmgen.php'."</b> on line <b>".__LINE__);
}

msg("info", $lang['478'], "<ul>".$lang['489']."</ul><br><br><a href='javascript:history.go(-1)'>{$lang['481']}</a>");
$stop_pm = TRUE;

}

if ($action == "delinf" AND !$stop_pm) {

if ($_REQUEST['user_hash'] == "" OR $_REQUEST['user_hash'] != $dle_login_hash)
die("Hacking attempt! User not found");
$id = intval( $_GET['id'] ); $tbl = trim($db->safesql(filterchar( $_GET['tbl'] )));
$db->query("DELETE FROM " . PREFIX . "_$tbl WHERE id='$id' ");
msg("info", $lang['478'], "<ul>".$lang['491']."</ul><br><br><a href='javascript:history.go(-1)'>{$lang['481']}</a>");
$stop_pm = TRUE;

}

if (isset($_POST["delall"]) AND !$stop_pm) {

if ($_REQUEST['user_hash'] == "" OR $_REQUEST['user_hash'] != $dle_login_hash)
die("Hacking attempt! User not found");

$tedad =$_POST["delinfo"];
$deleted_items = join(', ', $tedad);
$tbl = trim($db->safesql(filterchar( $_GET['tbl'] )));
$db->query("DELETE FROM " . PREFIX . "_$tbl WHERE id IN ($deleted_items) ");
msg("info", $lang['478'], "<ul>".$lang['491']."</ul><br><br><a href='javascript:history.go(-1)'>{$lang['481']}</a>");
$stop_pm = TRUE;

}


if ($action == "newfrm" || $action == "editfrm" && !$stop_pm){

echoheader("frmgen", "frmgen");
//$id = intval( $_GET['id'] );
echo <<<HTML
<link rel="stylesheet" type="text/css" media="all" href="engine/skins/calendar-blue.css" title="win2k-cold-1" />
<script type="text/javascript" src="engine/skins/calendar.js"></script>
<script type="text/javascript" src="engine/skins/calendar-en.js"></script>
<script type="text/javascript" src="engine/skins/calendar-setup.js"></script>
<script type="text/javascript" src="engine/skins/tabs.js"></script>
<div style='padding-top:5px;padding-bottom:2px;'>
<table width='100%'>
<tr>
<td width='4'><img src='engine/skins/images/tl_lo.gif' width='4' height='4' border='0'></td>
<td background='engine/skins/images/tl_oo.gif'><img src='engine/skins/images/tl_oo.gif' width='1' height='4' border='0'></td>
<td width='6'><img src='engine/skins/images/tl_ro.gif' width='6' height='4' border='0'></td>
</tr>
<tr>
<td background='engine/skins/images/tl_lb.gif'><img src='engine/skins/images/tl_lb.gif' width='4' height='1' border='0'></td>
<td style='padding:5px;' bgcolor='#FFFFFF'>
<table width='100%'>
<tr>
<td bgcolor='#EFEFEF' height='29' style='padding-left:10px;'><div class='navigation'>{$lang['400']}</div></td>
</tr>
</table>
<div class='unterline'></div>
<table width='100%'>
<tr>
<td style='padding:2px;'><table align='center' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td style='padding:2px;' height='29'><b>{$lang['401']}</b><br>{$lang['402']}<br><br></td>
</tr>
</table>
<form method="post" name="frmgen" id="frmgen" onsubmit="if (!check_reg_daten()) {return false;};" action="">
<table align='center' cellpadding='0' cellspacing='0' width='100%'>
HTML;

$dokmeh = ($action == "editfrm") ? $lang['494'] : $lang['435'];
$id = intval( $_GET['id'] );

if ($action == "editfrm" && $do == "info") {
$row = $db->super_query("SELECT frm_address, frm_title, frm_desc, frm_button, frm_mail, frm_table, frm_align, frm_template, frm_access, frm_selecttpl, frm_showcode, frm_sdate, frm_edate FROM " . PREFIX . "_forminfo WHERE id='$id'");
//print_r ($row); echo $id;
$row['frm_desc'] = $parse->decodeBBCodes($row['frm_desc'], false);
$row['frm_sdate'] = date("Y-m-d G:i", $row['frm_sdate']);
$row['frm_edate'] = ($row['frm_edate'] != "0000-00-00") ? date("Y-m-d", $row['frm_edate']) : "";
}
if (($action == "editfrm" && $do == "info") || $action == "newfrm") {
showRow($lang['403']." *", $lang['403'], "htm.<input type='text' name='frm_address' value='{$row['frm_address']}' class='edit' style='width:100px;' dir='ltr'>");
showRow($lang['404']." *", $lang['404'], "<input type='text' name='frm_title' value='{$row['frm_title']}' class='edit' style='width:200px;' dir='rtl'>");
showRow($lang['405'], $lang['406'], "{$bb_code}<textarea name='frm_desc' class='edit' style='width:98%; height:150px;' dir='rtl' onclick='setFieldName(this.name)'>{$row['frm_desc']}</textarea>");
}

$jsCheckFormInfo = (($action == "editfrm" && $do == "info") || $action == "newfrm") ? "if(frm.frm_address.value == '') {
alert('{$lang['441']}');
frmgen.frm_address.focus()
return false;
}

if (!(/[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+/.test(frm.frm_address.value))) {
alert('{$lang['514']}');
frmgen.frm_address.focus()
return false;
}

if(frm.frm_title.value == '') {
alert('{$lang['441']}');
frmgen.frm_title.focus()
return false;
}

if(frm.frm_button.value == '') {
alert('{$lang['441']}');
frmgen.frm_button.focus()
return false;
}

if(frm.frm_mail.value == '' && frm.frm_table_name.value == '') {
alert('{$lang['441']}');
frmgen.frm_mail.focus()
return false;
}

if (!(/[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+/.test(frm.frm_mail.value))) {
alert('{$lang['470']}');
frmgen.frm_mail.focus()
return false;
}" : "";

if($action == "newfrm"){$zm1=6; $zm2=16;}elseif($action == "editfrm" && $do == "fileds"){$zm1=1; $zm2=10;}

$jsCheckFormFileds = (($action == "editfrm" && $do == "fileds") || $action == "newfrm") ? "for (var i={$zm1}, a = 0;i<frm.elements.length;i+=9, a++) {
var elmnt = new Array();
var elmnt1 = new Array();
var elmnt2 = new Array();
var elmnt3 = new Array();

elmnt.push(frm.elements[i].value);
elmnt1.push(frm.elements[i+1].value);
elmnt2.push(frm.elements[i+2].value);
elmnt3.push(frm.elements[i+5].value);

//alert ('salam : ' + elmnt[a] + ' ' + a + ' ' + i);

if(elmnt[a] != '') {

if(elmnt1[a] == '') {
alert('{$lang['441']}');
//frm.elmnt1.name.focus()
return false;

}

if(elmnt2[a] == '') {
alert('{$lang['441']}');
//frm.elmnt2.name.focus()
return false;
}

if(elmnt[a] == 'select' || elmnt[a] == 'radio' ) {
if(elmnt3[a] == '') {
alert('{$lang['474']}');
//frm.elmnt3.name.focus()
return false;
}
}

if (!(/[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+/.test(elmnt2[a]))) {
alert('{$lang['473']}');
//frm.elmnt2.name.focus()
return false;
}

for (var j={$zm2};j<frm.elements.length;j+=9) {
var elmnt4 = new Array();
elmnt4.push(frm.elements[j].value);
if(elmnt4.name == 'frm_table') {
if(elmnt1[a] == elemnt4[a]) {
alert('{$lang['472']}');
//frm.elmnt4.name.focus()
return false;
}
if(elmnt2[a] == elemnt4[a]) {
alert('{$lang['472']}');
//frm.elmnt4.name.focus()
return false;
}
}
}
}
}" : "";

if (($action == "editfrm" && $do == "fileds") || $action == "newfrm") {
echo "<tr align=right>
<td colspan='2'><br><b>{$lang['407']}</b><br>{$lang['410']}<br>{$lang['411']}<br><br>
<table width='97%' cellpadding='1' align='center' cellspacing='1' dir='rtl' id='showFilde'>\n
<tr align='center' class='option'>
<td width='5%'> </td>\n
<td width='5%'><b>{$lang['408']}</b></td>\n
<td width='5%'><b>{$lang['560']}</b></td>\n
<td width='5%'><b>{$lang['589']}</b></td>\n
<td width='12%'><b>{$lang['409']}</b></td>\n
<td width='12%'><b>{$lang['412']}</b></td>\n
<td width='15%'><b>{$lang['413']}</b></td>\n
<td width='11%'><b>{$lang['414']}</b></td>\n
<td width='17%'><b>{$lang['415']}</b></td>\n
<td width='15%'><b>{$lang['416']}</b></td>\n
<td width='17%'><b>{$lang['417']}</b></td>\n</tr>
<tr><td background=\"engine/skins/images/mline.gif\" height=1 colspan=11></td></tr>";
}

if ($action == "editfrm" && $do == "fileds") {
$id = intval( $_REQUEST['id'] );
$db->query("SELECT id, freq, funiq, flist, ftype, title_fa, title_en, fsize1, fsize2, fselectop, fvalue, fdesc FROM " . PREFIX . "_formfildes WHERE form_id='$id' ORDER BY id ASC");
$a=0;
while ($rows = $db->get_row()) {
$a++;
$rows['fselectop'] = ($rows['fselectop'] != "") ? str_replace("|", "\r\n", $rows['fselectop']) : "";
$rows['fdesc'] = ($rows['fdesc'] != "") ? str_replace("<br />", "\r\n", $rows['fdesc']) : "";
if ($rows['freq']) $check_r ="checked"; else $check_r ="";
if ($rows['funiq']) $check_u ="checked"; else $check_u ="";
if ($rows['flist']) $check_l ="checked"; else $check_l ="";
echo "<tr align='center'>
<td>[$a]</td>\n
<td><input type='checkbox' name='freq[$rows[id]]' value='1' {$check_r}></td>\n
<td><input type='checkbox' name='funiq[$rows[id]]' value='1' {$check_u}></td>\n
<td><input type='checkbox' name='flist[$rows[id]]' value='1' {$check_l}></td>\n
<td>".makeDropDown(array(""=>$lang['471'],"checkbox"=>$lang['418'],"text"=>$lang['419'],"date"=>$lang['558'],"num"=>$lang['559'],"email"=>$lang['420'],"password"=>$lang['421'],
"radio"=>$lang['422'],"select"=>$lang['423'],"textarea"=>$lang['424'],"file_upload"=>$lang['425'],
"hidden"=>$lang['426']), "ftype[$rows[id]]", "{$rows['ftype']}", "ltr")."</td>\n
<td><input type='text' name='title_fa[$rows[id]]' value='{$rows['title_fa']}' class='edit' style='width:100px;' dir='rtl'></td>\n
<td><input type='text' name='title_en[$rows[id]]' value='{$rows['title_en']}' class='edit' style='width:100px;' dir='ltr'></td>\n
<td><input type='text' name='fsize1[$rows[id]]' value='{$rows['fsize1']}' class='edit' style='width:30px;' dir='ltr'>
&nbsp;&nbsp;<input type='text' name='fsize2[$rows[id]]' value='{$rows['fsize2']}' class='edit' style='width:30px;' dir='ltr'></td>\n
<td><textarea name='fselectop[$rows[id]]' class='edit' style='width:120px; height:40px;' dir='rtl'>{$rows['fselectop']}</textarea></td>\n
<td><input type='text' name='fvalue[$rows[id]]' value='{$rows['fvalue']}' class='edit' style='width:80px;' dir='rtl'></td>\n
<td><textarea name='fdesc[$rows[id]]' class='edit' style='width:100px; height:40px;' dir='rtl'>{$rows['fdesc']}</textarea></td>\n
</tr>
<tr><td background=\"engine/skins/images/mline.gif\" height=1 colspan=10></td></tr>";
}

}

if ($action == "newfrm"){
$tedad = intval($_POST['frm_tedad']);
for($i=1; $i<= $tedad; $i++) {
echo "<tr align='center'>
<td>[$i]</td>\n
<td><input type='checkbox' name='freq[$i]' value='1'></td>\n
<td><input type='checkbox' name='funiq[$i]' value='1'></td>\n
<td><input type='checkbox' name='flist[$i]' value='1'></td>\n
<td>".makeDropDown(array(""=>$lang['471'],"checkbox"=>$lang['418'],"text"=>$lang['419'],"date"=>$lang['558'],"num"=>$lang['559'],"email"=>$lang['420'],"password"=>$lang['421'],
"radio"=>$lang['422'],"select"=>$lang['423'],"textarea"=>$lang['424'],"file_upload"=>$lang['425'],
"hidden"=>$lang['426']), "ftype[$i]", "", "ltr")."</td>\n
<td><input type='text' name='title_fa[$i]' value='' class='edit' style='width:100px;' dir='rtl'></td>\n
<td><input type='text' name='title_en[$i]' value='' class='edit' style='width:100px;' dir='ltr'></td>\n
<td><input type='text' name='fsize1[$i]' value='' class='edit' style='width:30px;' dir='ltr'>
&nbsp;&nbsp;<input type='text' name='fsize2[$i]' value='' class='edit' style='width:30px;' dir='ltr'></td>\n
<td><textarea name='fselectop[$i]' class='edit' style='width:120px; height:40px;' dir='rtl'></textarea></td>\n
<td><input type='text' name='fvalue[$i]' value='' class='edit' style='width:80px;' dir='rtl'></td>\n
<td><textarea name='fdesc[$i]' class='edit' style='width:100px; height:40px;' dir='rtl'></textarea></td>\n
</tr>
<tr><td background=\"engine/skins/images/mline.gif\" height=1 colspan=10></td></tr>
";
}
}

if (($action == "editfrm" && $do == "fileds") || $action == "newfrm") {
echo "</table>
<tr><td background=\"engine/skins/images/mline.gif\" height=1 colspan=2></td></tr>";
}

if (($action == "editfrm" && $do == "info") || $action == "newfrm") {

showRow($lang['502']." *", $lang['503'], "<input type='text' name='frm_button' value='{$row['frm_button']}' class='edit' style='width:150px;' dir='rtl'>");
showRow($lang['428']." *", $lang['429'], "<input type='text' name='frm_mail' value='{$row['frm_mail']}' class='edit' style='width:150px;' dir='ltr'>");
if ($row['frm_table'] !="" || $action == "newfrm")
showRow($lang['430']." *", $lang['431'], "<input type='text' name='frm_table_name' value='{$row['frm_table']}' class='edit' style='width:150px;' dir='ltr'>");
showRow($lang['504'], $lang['504'], "<input type='text' name='frm_sdate' id='frm_sdate' value='{$row['frm_sdate']}' class='edit' style='width:150px;' dir='ltr'>&nbsp;
<img src='engine/skins/images/img.gif' align='absmiddle' id='f_trigger_c' style='cursor: pointer; border: 0' title='{$lang['506']}'/>
<script type='text/javascript'>
Calendar.setup({
inputField : 'frm_sdate', // id of the input field
ifFormat : '%Y-%m-%d %H:%M', // format of the input field
button : 'f_trigger_c', // trigger for the calendar (button ID)
align : 'Br', // alignment
timeFormat : '24',
showsTime : true,
singleClick : true
});
</script>");
showRow($lang['505'], $lang['505'], "<input type='text' name='frm_edate' id='frm_edate' value='{$row['frm_edate']}' class='edit' style='width:150px;' dir='ltr'>&nbsp;
<img src='engine/skins/images/img.gif' align='absmiddle' id='e_trigger_c' style='cursor: pointer; border: 0' title='{$lang['506']}'/>
<script type='text/javascript'>
Calendar.setup({
inputField : 'frm_edate', // id of the input field
ifFormat : '%Y-%m-%d', // format of the input field
button : 'e_trigger_c', // trigger for the calendar (button ID)
align : 'Br', // alignment
timeFormat : '24',
showsTime : true,
singleClick : true
});
</script>");

if ($action == "editfrm" && $do == "info") {
if ($row['frm_showcode']) $check_ca ="checked"; else $check_ca ="";
if ($row['frm_selecttpl']) $check_t ="checked"; else $check_t ="";
$groups = get_groups (explode(',', $row['frm_access']));
if ($row['frm_access'] == "all") $check_all ="selected"; else $check_all ="";
}elseif ($action == "newfrm"){$groups = get_groups (); $check_t ="checked"; $check_ca ="checked";}

showRow($lang['563'], $lang['564'], "<input type='checkbox' name='allow_captcha' value='1' {$check_ca}>");
showRow($lang['443'], $lang['444'], makeDropDown(array("right|rtl"=>$lang['445'],"left|ltr"=>$lang['446']), "frm_align", "{$row['frm_align']}", "rtl"));
showRow($lang['432'], $lang['432'], "tpl.<input type='text' name='frm_template' value='{$row['frm_template']}' class='edit' style='width:100px;' dir='ltr'>");

echo "<tr>
<td style='padding:4px;' class='option'><b>{$lang['433']}</b></td>
<td style='padding:2px;'><select name='grouplevel[]' style='width:150px;height:93px;' multiple><option value='all' {$check_all}>{$lang['442']}</option>{$groups}</select></td>
</tr>
<tr>
<td style='padding:4px;'>&nbsp;</td>
<td style='padding-left:2px;'><input type='checkbox' name='allow_template' value='1' {$check_t}> {$lang['434']}</td>
</tr>";
}
echo "<tr align=right>
<td><br><input type='submit' name='createfrm' value='{$dokmeh}' class='buttons'><br><br></td>
</tr>
</table>
</form></td>
</tr>
</table>
</td>
<td background='engine/skins/images/tl_rb.gif'><img src='engine/skins/images/tl_rb.gif' width='6' height='1' border='0'></td>
</tr>
<tr>
<td><img src='engine/skins/images/tl_lu.gif' width='4' height='6' border='0'></td>
<td background='engine/skins/images/tl_ub.gif'><img src='engine/skins/images/tl_ub.gif' width='1' height='6' border='0'></td>
<td><img src='engine/skins/images/tl_ru.gif' width='6' height='6' border='0'></td>
</tr>
</table>
</div>";

echofooter();

}

a_ahmadi
سه شنبه 22 مرداد 1392, 20:37 عصر
قسمت دوم


elseif($action == "backup" AND !$stop_pm) {
$id = intval( $_REQUEST['id'] );

$form_info = $db->super_query("SELECT frm_address, frm_title, frm_table, frm_ftname FROM " . PREFIX . "_forminfo WHERE id='$id'");
$Data=""; $FildName=array();
$selectF = explode("|", $form_info['frm_ftname']);
foreach ($selectF AS $tf) {
$tfi = explode(":", $tf);
$Data .= $tfi[0].";";
array_push($FildName, $tfi[1]);
}
$Data .= $lang['496'].";";
$Data .= $lang['483'].";";
$Data .= $lang['482'].$lang['585'].";";
$Data .= "\n";
$numFildes = count($FildName);
$db->query("SELECT * FROM " . PREFIX . "_{$form_info['frm_table']} ORDER BY id DESC");
while ($row = $db->get_row()) {
for ($i=0; $i<$numFildes; $i++) {
$Data .= $row[$FildName[$i]].";";
}
$Data .= $row['user_name'].";";
$Data .= $row['user_ip'].";";
$Data .= jdate("Y-m-d H:i", $row['date']).";";
$Data .= "\n";
}

header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename={$form_info['frm_address']}[{$form_info['frm_table']}-Table].csv");
echo "\xEF\xBB\xBF"; // UTF-8 BOM
echo $Data;
exit;
}

elseif($action == "list" AND !$stop_pm) {

echoheader("frmgen", "frmgen");

$limit = "35";
$page = intval( $_REQUEST['page'] );
if(!$page) $page = 0;
$id = intval( $_REQUEST['id'] );
$form_info = $db->super_query("SELECT frm_address, frm_title, frm_table FROM " . PREFIX . "_forminfo WHERE id='$id'");
//$cnt = $db->query("SELECT id FROM " . PREFIX . "_".$form_info['frm_table']."");
//$count = $db->num_rows($cnt);

for ($i=1; $i <=4; $i++) {

$field[$i] = $db->safesql( trim( htmlspecialchars( strip_tags( $_REQUEST['field'][$i] ) ) ) );
$condition[$i] = $db->safesql( trim( htmlspecialchars( strip_tags( $_REQUEST['condition'][$i] ) ) ) );
$word[$i] = $db->safesql( trim( htmlspecialchars( strip_tags( $_REQUEST['word'][$i] ) ) ) );

}

$orderby = $db->safesql( trim( htmlspecialchars( strip_tags( $_REQUEST['orderby'] ) ) ) );
if (! $orderby) $orderby = "id";
$ascdesc = $db->safesql( trim( htmlspecialchars( strip_tags( $_REQUEST['ascdesc'] ) ) ) );
if (! $ascdesc) $ascdesc = "DESC";

echo <<<HTML
<form method="post" action="" name="reportform" id="reportform">
<div style='padding-top:5px;padding-bottom:2px;display:none' name='report' id='report'>
<table width="100%">
<tr>
<td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
<td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
<td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
</tr>
<tr>
<td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
<td style="padding:5px;" bgcolor="#FFFFFF">
<table width="100%">
<tr>
<td bgcolor="#EFEFEF" height="29" style="padding-right:10px;"><div class="navigation">{$lang['575']}</div></td>
<td bgcolor="#EFEFEF" height="29" style="padding:5px;" align="left" valign="center">

<a href="javascript:ShowOrHide('report');"><img src="engine/skins/images/close.png" width="24" height="24" title="" alt="" border="0"></a>

</td>
</tr>
</table>
<div class="unterline"></div>
<table width="50%" align="center">
HTML;
$form_field_info = $db->super_query("SELECT frm_ftname FROM " . PREFIX . "_forminfo WHERE id='$id'");
$FildName = array(); $frm_fld = array('id'=>'ID');
$addf = array('user_name'=>$lang['496'], 'user_ip'=>$lang['483'], 'date'=>$lang['482'].$lang['585']);
$selectF = explode("|", $form_field_info['frm_ftname']);
foreach ($selectF AS $tf) {
$tfi = explode(":", $tf);
array_push($FildName[$tfi[1]] = $tfi[0]);
}
$form_fld = array_merge($FildName, $addf);
$form_f = array_merge($frm_fld, $form_fld);

for ($i=1; $i <=4; $i++) {
echo '<tr class="theight">
<td>';
echo makeDropDown($form_fld, "field[$i]", $field[$i], "rtl");
echo "</td>
<td>";
echo makeDropDown(array("equal"=>$lang['576'], "nequal"=>$lang['577'], "lese"=>$lang['578'],"more"=>$lang['579']), "condition[$i]", $condition[$i], "rtl");
echo '</td>
<td><input class="edit bk" size="31" type="text" name="word['.$i.']" dir="rtl" value="'.$word[$i].'"></td>
</tr>';
}

echo '<tr class="theight">
<td><br />'.$lang['586'].': '.makeDropDown($form_f, "orderby", $orderby, "rtl").'</td>
<td><br />'.makeDropDown(array('ASC'=>$lang['588'], 'DESC'=>$lang['587']), "ascdesc", $ascdesc, "rtl").'</td>';
echo <<<HTML
<td><br /><input type="submit" class="btn btn-success" value="{$lang['575']}" style="width:130px;">
<input type="hidden" name="action" value="list">
<input type="hidden" name="user_hash" value="$dle_login_hash" />
<input type="hidden" name="mod" value="frmgen">
<input type="hidden" name="page" id="page" value="{$page}">
<input type="hidden" name="id" value="$id"></td>
</tr>
</table><br />
</td>
<td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
</tr>
<tr>
<td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
<td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
<td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
</tr>
</table>
</div></form>
<div style='padding-top:5px;padding-bottom:2px;display:none' name='exportcsv' id='exportcsv'>
</div>
<div style='padding-top:5px;padding-bottom:2px;'>
<table width='100%'>
<tr>
<td width='4'><img src='engine/skins/images/tl_lo.gif' width='4' height='4' border='0'></td>
<td background='engine/skins/images/tl_oo.gif'><img src='engine/skins/images/tl_oo.gif' width='1' height='4' border='0'></td>
<td width='6'><img src='engine/skins/images/tl_ro.gif' width='6' height='4' border='0'></td>
</tr>
<tr>
<td background='engine/skins/images/tl_lb.gif'><img src='engine/skins/images/tl_lb.gif' width='4' height='1' border='0'></td>
<td style='padding:5px;' bgcolor='#FFFFFF'>
<table width='100%'>
<tr>
<td bgcolor='#EFEFEF' height='29' style='padding-left:10px;'><div class='navigation' style='padding:2px;'>{$lang['492']}</div></td>
<td bgcolor='#EFEFEF' height='29' style='padding:5px;' align='left' valign='center'>
<a href="javascript:ShowOrHide('report');"><input type='submit' class='btn btn-info' value='{$lang['575']}' style='width:130px;'></a>
</td>
</tr>
</table>
<div class='unterline'></div>
<table width='100%'>
<tr>
<td style='padding:2px;'></td></tr>
<tr>
<form action='$PHP_SELF?mod=frmgen&action=delall&tbl={$form_info['frm_table']}&user_hash=$dle_login_hash' method='post' name='editinf'>
<table width='100%' cellpadding='1' align='center' cellspacing='1' dir='rtl' id='postlist'>\n
<tr class='thead'>
<th width='5%' style='padding:2px;'><b>{$lang['458']}</b></th>\n
HTML;
$titleen = array();
$db->query("SELECT flist, title_fa, title_en FROM " . PREFIX . "_formfildes WHERE flist=1 AND form_id='$id'");
$count = $db->num_rows();
$b=0;
if($count){
while ($row = $db->get_row()) {
echo "<th width='10%'><b>{$row['title_fa']}</b></th>\n";
$b++;
array_push($titleen, $row['title_en']);
}
}
$colspan = $count != 0 ? (7+$b) : 7;
echo <<<HTML
<th width='7%'><b>{$lang['496']}</b></th>\n
<th width='15%'><b>{$lang['484']}</b></th>\n
<th width='7%'><b>{$lang['483']}</b></th>\n
<th width='7%'><b>{$lang['455']}</b></th>\n
<th width='25%'><b>{$lang['436']}</b></th>\n
<th width='5%'><input type='checkbox' name='master_box' title='{$lang['500']}' onclick='javascript:ckeck_uncheck_all()'></td>\n</tr>
<tr class="thead"><th colspan="{$colspan}"><div class="hr_line"></div></th></tr>

HTML;

$where = array ();
global $where;
for ($i=1; $i <=4; $i++) {

if( ! empty( $word[$i] ) ) {
if ($condition[$i] == "equal") $where[] = $field[$i]." like '$word[$i]%'";
elseif ($condition[$i] == "nequal") $where[] = $field[$i]." <> '$word[$i]'";
elseif ($condition[$i] == "lese") $where[] = $field[$i]." <= '$word[$i]'";
elseif ($condition[$i] == "more") $where[] = $field[$i]." >= '$word[$i]'";
}
}

$where = implode( " AND ", $where );
if( ! $where ) $where = "";
else $where = " WHERE ". $where;
$cnt = $db->query("SELECT id FROM " . PREFIX . "_".$form_info['frm_table'].$where."");
$count = $db->num_rows($cnt);
$db->query("SELECT * FROM " . PREFIX . "_{$form_info['frm_table']}$where ORDER BY $orderby $ascdesc LIMIT $page,$limit");
//echo $count;
$a = 0;
while ($data = $db->get_row()) {
$a++;
$bg = ($data['view_info'] !=1) ? " bgcolor='FFEFB0'" : "";
$user_name = ($data['user_name'] !="") ? "<a href=\"".$config['http_home_url']."user/$data[user_name]/\" title=\"$lang[496] : $data[user_name]\">$data[user_name]</a>" : "$lang[507]";
echo"<tr height='33' dir='rtl'$bg>
<td>&nbsp;$a</td>";
foreach($titleen as $val)
echo "<td>&nbsp;$data[$val]</td>";
echo "<td>$user_name</td>\n
<td>$data[user_agnt]</td>\n
<td>$data[user_ip]</td>\n
<td>".jdate("Y/m/d G:i", $data[date])."</td>\n
<td>[<a onclick=\"window.open ('$PHP_SELF?mod=frmgen&action=fullist&tbl=$form_info[frm_table]&id=$data[id]','_blank','width=550, height=570, scrollbars=yes, resizable=no, address=yes');\"
href=\"javascript:ID[$data[id]]\" title=\"$lang[488]\">$lang[488]</a>]
[<a href=\"".$config['http_home_url'].$data[id]."-".$form_info[frm_address].".htm\" title=\"$lang[438]\" target=\"blank\">$lang[438]</a>] |
[<a onClick=\"return alarm('{$lang[497]}');\" href=\"$PHP_SELF?mod=frmgen&action=delinf&tbl=$form_info[frm_table]&id=$data[id]&user_hash=$dle_login_hash\" title=\"$lang[439]\">$lang[439]</a>]</td>
<td><input type='checkbox' name='delinfo[]' value='$data[id]'></td></tr>
<tr><td background=\"engine/skins/images/mline.gif\" height=1 colspan={$colspan}></td></tr>";
}

$pagelink = $limit < $count ? "صفحه :&nbsp;&nbsp;".pagelink("&id=".$id, "&action=list", $page, $limit, $count) : "";

echo "</td>
</tr>
<tr class='tfoot'><th align=right colspan=6>$pagelink</th>
<th><br><input type='submit' name='delall' value='{$lang['499']}' class='btn btn-warning btn-mini' style='width:130px;height:26px;'><br></th></tr>
</table></form>
</td>
<td background='engine/skins/images/tl_rb.gif'><img src='engine/skins/images/tl_rb.gif' width='6' height='1' border='0'></td>
</tr>
<tr>
<td><img src='engine/skins/images/tl_lu.gif' width='4' height='6' border='0'></td>
<td background='engine/skins/images/tl_ub.gif'><img src='engine/skins/images/tl_ub.gif' width='1' height='6' border='0'></td>
<td><img src='engine/skins/images/tl_ru.gif' width='6' height='6' border='0'></td>
</tr>
</table>
</div>

<script language='JavaScript' type='text/javascript'>

function ckeck_uncheck_all() {
var frm = document.editinf;
for (var i=0;i<frm.elements.length;i++) {
var elmnt = frm.elements[i];
if (elmnt.type=='checkbox') {
if(frm.master_box.checked == true){ elmnt.checked=false; }
else{ elmnt.checked=true; }
}
}
if(frm.master_box.checked == true){ frm.master_box.checked = false; }
else{ frm.master_box.checked = true; }
}

function alarm(thetext){
return confirm(thetext);
}

$(function(){

$('#postlist').delegate('tr', 'hover', function(){
$(this).toggleClass('hoverRow');
});

});

function list_submit(prm){
document.reportform.page.value=prm;
document.reportform.submit();
return false;
}

</script>";

echofooter();

}

elseif($action == "fullist" AND !$stop_pm) {
$id = intval( $_GET['id'] );$tbl = trim($db->safesql(filterchar( $_GET['tbl'] )));
$table_info = $db->super_query("SELECT frm_title, frm_align, frm_ftname FROM " . PREFIX . "_forminfo WHERE frm_table='$tbl'");
$db->query("SELECT * FROM " . PREFIX . "_$tbl WHERE id='$id'");

$data = $db->get_row();

$frm_align = explode("|", $table_info['frm_align']);

echo <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fa" lang="fa" dir="rtl">
<head>
<meta content="text/html; charset={$config['charset']}" http-equiv="content-type" />
<title>{$table_info['frm_title']}</title>
</head>
<body>
<table align='$frm_align[0]' cellpadding='0' cellspacing='0' width='100%' dir='$frm_align[1]' style='font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px;'>\r\n
<tr><td colspan='2' height='40'>&nbsp;{$lang['480']}&nbsp;<font color='#000080'>{$table_info['frm_title']}</font></td>\r\n";
HTML;
$selectF = explode("|", $table_info['frm_ftname']);
foreach ($selectF AS $tf) {
$tfi = explode(":", $tf);
$FildName = $tfi[1];
echo "<tr><td width='25%'>&nbsp;$tfi[0]</td>\r\n
<td height='30'>&nbsp;$data[$FildName]</td></tr>\r\n";
}

echo "<tr><td width='20%'>&nbsp;{$lang['496']}</td>\r\n
<td height='30'>&nbsp; ".($data[user_name] == "" ? "$lang[507]" : "<a href=\"".$config['http_home_url']."user/{$data['user_name']}/\" title=\"$lang[496] : {$data['user_name']}\">{$data['user_name']}</a>")."</td></tr>\r\n
<tr><td>&nbsp;{$lang['482']}</td>\r\n
<td height='30'>&nbsp;".jdate("Y/m/d G:i", $data[date])."</td></tr>\r\n
<tr><td>&nbsp;{$lang['483']}</td>\r\n
<td height='30'>&nbsp;$data[user_ip]</td></tr>\r\n
<tr><td>&nbsp;{$lang['484']}</td>\r\n
<td height='30'>&nbsp;$data[user_agnt]</td></tr>\r\n</table>\r\n";
echo " </body>
</html>";
$db->query("UPDATE " . PREFIX . "_$tbl SET view_info=1 WHERE id='$id'");
}

elseif(!$stop_pm) {

echoheader("frmgen", "frmgen");

$limit = "25";
$page = intval( $_REQUEST['page'] );
if(!$page) $page = 0;
$cnt = $db->query("SELECT id FROM " . PREFIX . "_forminfo");
$count = $db->num_rows($cnt);

echo "<div style='padding-top:5px;padding-bottom:2px;'>
<table width='100%'>
<tr>
<td width='4'><img src='engine/skins/images/tl_lo.gif' width='4' height='4' border='0'></td>
<td background='engine/skins/images/tl_oo.gif'><img src='engine/skins/images/tl_oo.gif' width='1' height='4' border='0'></td>
<td width='6'><img src='engine/skins/images/tl_ro.gif' width='6' height='4' border='0'></td>
</tr>
<tr>
<td background='engine/skins/images/tl_lb.gif'><img src='engine/skins/images/tl_lb.gif' width='4' height='1' border='0'></td>
<td style='padding:5px;' bgcolor='#FFFFFF'>
<table width='100%'>
<tr>
<td bgcolor='#EFEFEF' height='29' style='padding-left:10px;'><div class='navigation'>{$lang['400']}</div></td>
</tr>
</table>
<div class='unterline'></div>
<table width='100%'>
<tr>
<td style='padding:2px;'><table align='center' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td style='padding:2px;' height='29'><b>{$lang['463']}</b><br><form method='post' name='frmtedad' id='frmtedad' onsubmit=\"if(document.frmtedad.frm_tedad.value == '' || document.frmtedad.frm_tedad.value > 50 || document.frmtedad.frm_tedad.value < 2){alert('$lang[465]'); frmtedad.frm_tedad.focus(); return false}\"
action='$PHP_SELF?mod=frmgen&action=newfrm'>
{$lang['464']}&nbsp;&nbsp;<input type='text' name='frm_tedad' class='edit' style='width:30px;' dir='ltr'>&nbsp;&nbsp;
<input type='submit' name='newfrm' value='{$lang['435']}' class='buttons'></form><br></td>
</tr>
<tr>
<td style='padding:2px;' height='29'><b>{$lang['447']}</b><br>{$lang['448']}<br><br></td>
</tr></table>
<tr>
<table width='100%' cellpadding='1' align='center' cellspacing='1' dir=\"rtl\">\n
<tr align=center>
<td width='3%'><b>{$lang['458']}</b></td>\n
<td width='20%'><b>{$lang['449']}</b></td>\n
<td width='8%'><b>{$lang['450']}</b></td>\n
<td width='8%'><b>{$lang['456']}</b></td>\n
<td width='10%'><b>{$lang['453']}</b></td>\n
<td width='12%'><b>{$lang['451']}</b></td>\n
<td width='12%'><b>{$lang['452']}</b></td>\n
<td width='34%'><b>{$lang['436']}</b></td>\n</tr>
<tr><td background=\"engine/skins/images/mline.gif\" height=1 colspan=8></td></tr>";
$db->query("SELECT id, frm_address, frm_title, frm_mail, frm_table, frm_access, frm_show, frm_fill, frm_sdate, frm_lastvisit FROM " . PREFIX . "_forminfo ORDER BY id ASC LIMIT $page, $limit");
$a = 0;
while ($data = $db->get_row()) {
$a++;
echo"<tr align='center' height='27' dir='rtl'>
<td>$a</td>
<td><a href=\"".($config['allow_alt_url'] == "yes" ? "".$config['http_home_url']."$data[frm_address].htm" : "".$config['http_home_url']."index.php?do=form&frm=$data[frm_address]")."\" title=\"$lang[437] : $data[frm_mail]\n$lang[453] : $data[frm_table]\" target=\"_blank\">$data[frm_title]</a></td>\n
<td>$data[frm_show] $lang[457]</td>\n
<td>".($data[frm_fill]=="" ? "0" : $data[frm_fill])." $lang[457]</td>\n
<td>".($data[frm_table]=="" ? "---" : $data[frm_table])."</td>\n
<td>".jdate("Y/m/d G:i", $data[frm_sdate])."</td>\n
<td>".($data[frm_lastvisit]=="" ? "---" : jdate("Y/m/d G:i", $data[frm_lastvisit]))."</td>\n
<td>".($data[frm_table] !="" ? "[<a href=\"$PHP_SELF?mod=frmgen&action=list&id=$data[id]\" title=\"$lang[460]\">$lang[460]</a>] [<a href=\"$PHP_SELF?mod=frmgen&action=backup&id=$data[id]\" target=\"_blank\" title=\"$lang[515]\">$lang[515]</a>]" : "")."
[<a href=\"$PHP_SELF?mod=frmgen&action=editfrm&do=info&id=$data[id]\" title=\"$lang[511]\">$lang[509]</a>]
[<a href=\"$PHP_SELF?mod=frmgen&action=editfrm&do=fileds&id=$data[id]\" title=\"$lang[512]\">$lang[510]</a>]
[<a onClick=\"return alarm('{$lang[462]}');\" href=\"$PHP_SELF?mod=frmgen&action=delete&id=$data[id]&user_hash=$dle_login_hash\" title=\"$lang[439]\">$lang[439]</a>]
<tr><td background=\"engine/skins/images/mline.gif\" height=1 colspan=8></td></tr>";
}

$pagelink = $limit < $count ? "صفحه :&nbsp;&nbsp;".pagelink("", "", $page, $limit, $count) : "";

echo "</td>
</tr>
<tr><td align=center colspan=8><br>$pagelink<br><br></td></tr>
</table>
</td>
<td background='engine/skins/images/tl_rb.gif'><img src='engine/skins/images/tl_rb.gif' width='6' height='1' border='0'></td>
</tr>
<tr>
<td><img src='engine/skins/images/tl_lu.gif' width='4' height='6' border='0'></td>
<td background='engine/skins/images/tl_ub.gif'><img src='engine/skins/images/tl_ub.gif' width='1' height='6' border='0'></td>
<td><img src='engine/skins/images/tl_ru.gif' width='6' height='6' border='0'></td>
</tr>
</table>
</div>

<script type='text/javascript'>

function alarm(thetext){
return confirm(thetext);
}

function list_submit(prm){
document.listform.page.value=prm;
document.listform.submit();
return false;
}

</script>";
echofooter();

}

}else{
echo "<center><br><br><font color=\"#ff0000\"><b>{$lang['501']}</b></font></cente>";
die();
}

?>

meysammoezi
دوشنبه 01 مهر 1392, 23:20 عصر
دوست عزیز a_ahmadi زحمت خرابی ها این فایل های دیکد شده رو می کشید؟
ممنون

a_ahmadi
سه شنبه 02 مهر 1392, 01:46 صبح
دوست عزیز a_ahmadi زحمت خرابی ها این فایل های دیکد شده رو می کشید؟
ممنون
در قالب فایل دانلود کنید.

meysammoezi
سه شنبه 02 مهر 1392, 14:07 عصر
ممنون خیلی کمکم کردی خدا خیرت بده

Tarragon
سه شنبه 02 مهر 1392, 17:16 عصر
سلام
اقا میثم لطفا از دکمه تشکر برای تشکر کردن استفاده کنید.
با تشکر :دی