<?php
ini_set("display_errors","1");
ini_set("display_startup_errors","1");
set_magic_quotes_runtime(0);
include("include/dbcommon.php");
include("include/consultants_variables.php");
// check if logged in
if(!@$_SESSION["UserID"] || !CheckSecurity(@$_SESSION["OwnerID"],"Search"))
{
$_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"];
header("Location: login.php?message=expired");
return;
}
$filename="";
$message="";
//connect database
$conn = db_connect();
$keys=array();
$keys["Primary"]=postvalue("editid1");
// get current values and show edit controls
$strSQL=$gstrSQL;
$where = KeyWhere($keys);
$strSQL = AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs=db_query($strSQL,$conn);
$data=db_fetch_array($rs);
include('libs/Smarty.class.php');
$smarty = new Smarty();
$smarty->assign("show_key1", htmlspecialchars(GetData($data,"Primary", "")));
$keylink="";
$keylink.="&key1=".htmlspecialchars(urlencode($data["Primary"]));
////////////////////////////////////////////
// Consultant -
$value="";
$value = htmlspecialchars(GetData($data,"Consultant", ""));
$smarty->assign("show_Consultant",$value);
$smarty->display("consultants_view.htm");
?>