0){ $id = $_REQUEST['entry_id']; $qryEmail = "select * from tbl_main1 where id='$id'"; $rsltEmail = mysql_query($qryEmail); $rowsEmail = mysql_fetch_array($rsltEmail); $ToEmail = $_POST['uEmail']; $entry_id = $rowsEmail['id']; $first_name = $rowsEmail['first_name']; $last_name = $rowsEmail['last_name']; $block_number = $rowsEmail['block_number']; $row_number = $rowsEmail['row_number']; $grave_number = $rowsEmail['grave_number']; $death_date = $rowsEmail['arabic_date']; $emAddress=$rowsEmail['first_name']." ".$rowsEmail['father_name']." ".$rowsEmail['last_name']; }else{ $ToEmail = $_REQUEST['email_address']; $entry_id = $_REQUEST['id']; $first_name = $_REQUEST['first_name']; $last_name = $_REQUEST['last_name']; $block_number = $_REQUEST['block_number']; $row_number = $_REQUEST['row_number']; $grave_number = $_REQUEST['grave_number']; $death_date = $_REQUEST['arabic_date']; $emAddress=$_REQUEST['first_name']." ".$_REQUEST['father_name']." ".$_REQUEST['last_name']; } $position_query = "select * from tbl_block where block LIKE '" . $block_number. "'"; $position_result = mysql_query($position_query); $position = mysql_fetch_array($position_result); $position = explode(',', $position['coordinate']); $latitude = $position[0]; $longitude = $position[1]; $geocode = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?latlng=' . $latitude . "," . $longitude . '&sensor=false'); $output = json_decode($geocode); //$emAddress = $output->results[0]->formatted_address; $from = ADMIN_EMAIL; $EmailSubject = "Inquiry Email"; $MESSAGE_BODY = ""; if($_REQUEST['entry_id']>0){ $MESSAGE_BODY .= "Message: "; $MESSAGE_BODY .= $_REQUEST['uMsge'] . "
"; } $MESSAGE_BODY .= ''; $MESSAGE_BODY .= '
' . $entry_id . '
' .$first_name . ' ' . $last_name . '
المقبرة
رقم المربع
رقم الصف
رقم القبر
تاريخ الوفاةبالهجري
الخريطة
' . $emAddress . '
' . $block_number . '
' . $row_number . '
' . $grave_number . '
' . $death_date . '
google_map
'; $MESSAGE_BODY .= ''; $mailheader .= "Content-type: text/html; charset=UTF-8\r\n"; $mailheader .= "From: " . $from ; mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die("Failure"); if($_REQUEST['action'] != 'send_both'){ if($_REQUEST['entry_id']>0){ echo ""; }else{ echo json_encode(array('code'=>'OK', 'msg'=>'Your message has been sent via email')); exit; } } } if ($_REQUEST['action']=='send_both' || $_REQUEST['action'] == "send_sms") { if($_REQUEST['entry_id']>0){ $id = $_REQUEST['entry_id']; $qryEmail = "select * from tbl_main1 where id='$id'"; $rsltEmail = mysql_query($qryEmail); $rowsEmail = mysql_fetch_array($rsltEmail); $ToPhone = $_POST['uPhone']; $entry_id = $rowsEmail['id']; $first_name = $rowsEmail['first_name']; $last_name = $rowsEmail['last_name']; $block_number = $rowsEmail['block_number']; $row_number = $rowsEmail['row_number']; $grave_number = $rowsEmail['grave_number']; $death_date = $rowsEmail['death_date']; $emAddress=$rowsEmail['first_name']." ".$rowsEmail['father_name']." ".$rowsEmail['last_name']; }else{ $ToPhone = $_REQUEST['phone_num']; $entry_id = $_REQUEST['id']; $first_name = $_REQUEST['first_name']; $last_name = $_REQUEST['last_name']; $block_number = $_REQUEST['block_number']; $row_number = $_REQUEST['row_number']; $grave_number = $_REQUEST['grave_number']; $death_date = $_REQUEST['death_date']; $emAddress=$_REQUEST['first_name']." ".$_REQUEST['father_name']." ".$_REQUEST['last_name']; } $position_query = "select * from tbl_block where block LIKE '" . $block_number. "'"; $position_result = mysql_query($position_query); $position = mysql_fetch_array($position_result); $position = explode(',', $position['coordinate']); $latitude = $position[0]; $longitude = $position[1]; $geocode = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?latlng=' . $latitude . "," . $longitude . '&sensor=false'); $output = json_decode($geocode); //$emAddress = $output->results[0]->formatted_address; $MESSAGE_BODY = ""; if($_REQUEST['entry_id']>0){ $MESSAGE_BODY .= "Message: " . $_REQUEST['uMsge'] . ", "; } $MESSAGE_BODY .= "موقع القبر: " . $emAddress . ", "; $MESSAGE_BODY .= "مربع: " . $block_number . ", "; $MESSAGE_BODY .= "صف: " . $row_number . ", "; $MESSAGE_BODY .= "قبر: " . $grave_number . ", "; $MESSAGE_BODY .= "تاريخ الوفاة بالتقويم الانجليزي: " . $death_date . ", "; $MESSAGE_BODY .= " Info.dammamcemetery@gmail.com "; $sms_reult = sendSMS(SMS_USER, SMS_PWD, $ToPhone, SMS_SENDER, $MESSAGE_BODY); if($sms_reult==1){ if($_REQUEST['entry_id']>0){ echo ""; }else{ echo json_encode(array('code'=>'OK', 'msg'=>'Your message has been sent vai sms')); exit; } }else{ if($_REQUEST['entry_id']>0){ echo ""; }else{ echo json_encode(array('code'=>'failed', 'msg'=>$sms_reult)); exit; } } } ?> لوحـة التحكـم 0 ? $_REQUEST['cat'] : 0; $key = $_REQUEST['key'] ? $_REQUEST['key'] : ''; $id = $_REQUEST['id']; if ($_REQUEST['action'] == "update_entry") { $updateEntry = array( 'first_name' => $_REQUEST['first_name'], 'last_name' => $_REQUEST['last_name'], 'father_name' => $_REQUEST['father_name'], 'grandfather_name' => $_REQUEST['grandfather_name'], 'ggrandfather_name' => $_REQUEST['ggrandfather_name'], 'block_number' => $_REQUEST['block_number'], 'grave_number' => $_REQUEST['grave_number'], 'row_number' => $_REQUEST['row_number'], 'death_date' => $_REQUEST['death_date'], 'arabic_date' => $_REQUEST['arabic_date'], 'email' => $_REQUEST['email_address'], 'phone' => $_REQUEST['phone_num'] ); if (Database::upd_rec("tbl_main1", $updateEntry, "id='$id'")) { header("location:index.php"); } else { echo("Error"); } } if ($_REQUEST['action'] == "new_entry") { $newid = $_REQUEST['id']; $email = $_REQUEST['email_address']; $phone = $_REQUEST['phone_num']; $first_name = $_REQUEST['first_name']; $father_name = $_REQUEST['father_name']; $grandfather_name = $_REQUEST['grandfather_name']; $ggrandfather_name = $_REQUEST['ggrandfather_name']; $last_name = $_REQUEST['last_name']; $block_number = $_REQUEST['block_number']; $row_number = $_REQUEST['row_number']; $grave_number = $_REQUEST['grave_number']; $date = $_REQUEST['death_date']; $arabic_date = $_REQUEST['arabic_date']; if ($first_name == "" || $grave_number == "" || $row_number == "" ) { ?> $_REQUEST['id'], 'first_name' => html_entity_decode($_REQUEST['first_name']), 'last_name' => $_REQUEST['last_name'], 'father_name' => $_REQUEST['father_name'], 'grandfather_name' => $_REQUEST['grandfather_name'], 'ggrandfather_name' => $_REQUEST['ggrandfather_name'], 'block_number' => $_REQUEST['block_number'], 'grave_number' => $_REQUEST['grave_number'], 'row_number' => $_REQUEST['row_number'], 'death_date' => $_REQUEST['death_date'], 'arabic_date' => $_REQUEST['arabic_date'], 'email' => $_REQUEST['email_address'], 'phone' => $_REQUEST['phone_num'] ); if (Database::ins_rec("tbl_main1", $newEntry)) { header("location:index.php"); } else { echo("Error"); } } } if ($_REQUEST['uid2'] != "") { $userid = $_REQUEST['uid2']; $Delqry = "DELETE FROM tbl_main1 WHERE id='$userid'"; $Delrs = mysql_query($Delqry); header("location:index.php"); } ?>
V1.0
لوحـة التحكـم
'; ?>
'; } ?>
'; ?>

تسجيل خروج
'; ?>
submit
#
تاريخ
الاسم الأول
اسم الأب
إسم الجد
إسم اب الجد
اسم العائلة
المربع#
sql; //echo $queryRetrive; $qryRslt = mysql_query($queryRetrive); while ($rows = mysql_fetch_array($qryRslt)) { ?>

show_paging("index.php", "para1=val1")); ?>