session_start(); ?>
$_SESSION['c']=3; ?>
include "../process/chk_member_session.php"; ?>
include_once "../process/me_functions.php"; ?>
$cpage="study_plan";
$c=$_SESSION['c']; //----- current page number
list ($vuid, $email,$fname, $gender,$city_id,$course_id,$campus_id,$s_date, $actitle ) = user_profile($ss_member_id);
$mycity=getcity($city_id);
$mycampus=getcampus($campus_id);
if(isset($_POST['Submit']))
{
$up_did=$_POST['up_did'];
$ph=$_POST['ph'];
$question=$_POST['question'];
//-------------------- start security code varify
if( $_SESSION['security_code'] == $_REQUEST['security_code'] && !empty($_SESSION['security_code'] ) )
{
$sqlchk = "Select d_id from study_messages
where message = '$question' and d_id = $up_did";
$res1 = $db->ExecuteQuery($sqlchk);
$count_rows = $res1->GetSelectedRows();
if($count_rows <= 0){
//----------------------------update phone into disscussion table
$sql_update2 = "UPDATE study_discussions
set
ph='$ph',
status=2
WHERE d_id=$up_did";
$rs_update2 = $db->ExecuteQuery($sql_update2);
//----------------------------add into message table
$sql="INSERT INTO study_messages
(d_id,message,time,type)
VALUES ($up_did,'$question',UTC_TIMESTAMP(),'q')";
$res=$db->ExecuteQuery($sql);
$id = mysql_insert_id();
# Email the admin
$headers = "From: $fname <$email>\n";
$headers .= "Reply-To: $fname <$email>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "X-Mailer: WebMail\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "Cc: decent_arooj@yahoo.com , sirshahid_pak@yahoo.com\r\n";
$message = 'A Further Study question has been asked at vu786.com
';
$message .= 'Title: '.$title.'
';
$message .= 'Question: '.$question.'
';
$message .= 'Member Name: '.$fname.'
';
$message .= 'Email Address: '.$email.'
';
$message .= 'course: '.getcourse($course_id).'
';
$message .= 'City : '.getcity($city_id).'
';
$message .= 'Campus : '.getcampus($campus_id).'
';
$message .= 'VUID : '.$vuid.'
';
mail($admin_email, 'Further Question Asked by '.$fname, $message, "$headers");
// header("location: index.php?action=added");
// exit;
}
}else{ //----------- if invalid security
$msg ="Invalid security code provided, please try again.";
}
}
//------------get querystrind value from step1
if(isset($_REQUEST['did'])){
$did = $_REQUEST['did'];
//------------------get discussion information
list ($d_id, $d_mem_id, $d_sub,$d_status, $d_time,$d_ph) = study_dis($did);
//-------------- if handout exist or not
if(empty($did)) {
header("location: ../study");
exit();
}
//------------ if this discussiong belong to this person then
if($ss_member_id!=$d_mem_id)
{
header("location: ../study");
exit();
}
}
?>
View Discussion for study plans of Virtual University students at vu786
|
|
|
include_once "../members/includes/header.php"; ?>
|
| include_once "../members/includes/info.php"; ?> |
| |