I have the following in function icontable:
$data["edit_link_1"] = "./myprofile.php?sel=1";
I am trying to find which template it is pointing to, i want to add a input text box in that template: Can you please help me.
I have attached the code which has the function also:
include "./include/config.php";
include "./common.php";
include "./include/config_index.php";
include "./include/functions_index.php";
include "./include/functions_auth.php";
include "./include/class.lang.php";
include "./include/class.percent.php";
$user = auth_index_user();
RefreshAccount($user);
if(!$user[0]) ////// if user not registered
header("location: ".$config["site_root"]."/index.php");
$mode = IsFileAllowed($user[0], GetRightModulePath(__FILE__));
$multi_lang = new MultiLang($config, $dbconn);
///// default multilanguage field for select
$field_name = $multi_lang->DefaultFieldName();
$profile_percent = new Percent($config, $dbconn, $user[0]);
///// check ins messages if user not guest
if($user[3] != 1){
GetAlertsMessage();
SetModuleStatistic(GetRightModulePath(__FILE__));
}
$sel =$_POST["sel"]?$_POST["sel"]:$_GET["sel"];
if($mode == 0) ///// permission denied
AlertPage(GetRightModulePath(__FILE__)); ///// function from ./include/functions_index.php
switch($sel){
case "1": profile_page1(); break;
case "2": profile_page2(); break;
case "3": profile_page3(); break;
case "country": profile_page3("country"); break;
case "savebasic": SaveBasicProfile(); break;
case "saveannonce": SaveAnnonceProfile(); break;
case "savedescr": SaveDescrProfile(); break;
case "savepersonal": SavePersonalProfile(); break;
case "saveportreit": SavePortreitProfile(); break;
case "saveinterest": SaveInterestProfile(); break;
case "saveperfect": SavePerfectProfile(); break;
case "saveperfectint": SavePerfectintProfile(); break;
default: ListProfile();
}
function ListProfile(){
global $lang, $config, $config_index, $smarty, $dbconn, $user, $profile_percent;
Banners(GetRightModulePath(__FILE__));
LeftMenu();
IndexHomePage();
$id = $user[0];
///// user info
$page["name"] = $user[5];
$strSQL = "select count(*) from ".USERS_TABLE." ";
$rs = $dbconn->Execute($strSQL);
$page["all"] = $rs->fields[0];
$strSQL = "select count(*) from ".ACTIVE_SESSIONS_TABLE." ";
$rs = $dbconn->Execute($strSQL);
$page["active"] = $rs->fields[0];
$page["completion"] = $profile_percent->GetAllPercent();
$strSQL = "select count(*) from ".PROFILE_VISIT_TABLE." a, ".USERS_TABLE." b where a.id_user='".$id."' and b.id=a.id_visiter and b.guest_user <> '1'";
$rs = $dbconn->Execute($strSQL);
$page["visit_my_page"] = $rs->fields[0];
$strSQL = "select count(*) from ".PROFILE_VISIT_TABLE." a, ".USERS_TABLE." b where a.id_user='".$id."' and b.id=a.id_visiter and b.guest_user <> '1' and unix_timestamp(a.visit_date)>".(mktime()-24*60*60)." ";
$rs = $dbconn->Execute($strSQL);
$page["visit_my_page_1"] = $rs->fields[0];
$strSQL = "select count(*) from ".PROFILE_VISIT_TABLE." a, ".USERS_TABLE." b where a.id_user='".$id."' and b.id=a.id_visiter and b.guest_user <> '1' and unix_timestamp(a.visit_date)>".(mktime()-30*24*60*60)." ";
$rs = $dbconn->Execute($strSQL);
$page["visit_my_page_2"] = $rs->fields[0];
$smarty->assign("page", $page);
IconTable($id);
PersonalTable($id);
AnnonceTable($id);
DescriptionTable($id);
MyPersonalityTable($id);
MyPortraitTable($id);
MyInterestsTable($id);
MyCriteriaTable($id);
HisInterestsTable($id);
$smarty->assign("header", $lang["profile"]);
$smarty->assign("header_basic", $lang["users"]);
$smarty->assign("header_home", $lang["homepage"]);
$smarty->assign("section", $lang["section"]);
$smarty->assign("alt", $lang["alt"]);
$smarty->display(TrimSlash($config["index_theme_path"])."/myprofile_table.tpl");
exit;
}
function IconTable($id){
global $lang, $config, $config_index, $smarty, $dbconn, $user;
///// icon
$strSQL = "select a.icon_path, a.icon_path_temp, e.default_icon as icon_path_default, a.gender, a.fname, a.sname, a.login, a.headline from ".USERS_TABLE." a left join ".USER_TYPES_SPR_TABLE." e on e.id = a.gender where a.id='".$id."' ";
$rs = $dbconn->Execute($strSQL);
$row = $rs->GetRowAssoc(false);
////////// settings
$strSQL = "select value, name from ".SETTINGS_TABLE." where name in ('icons_folder', 'min_age_limit', 'max_age_limit', 'photo_max_count', 'audio_max_count', 'video_max_count')";
$rs = $dbconn->Execute($strSQL);
while(!$rs->EOF){
$settings[$rs->fields[1]] = $rs->fields[0];
$rs->MoveNext();
}
$icon_path = $row["icon_path"]?$row["icon_path"]:($row["icon_path_temp"]?$row["icon_path_temp"]:$row["icon_path_default"]);
if($icon_path && file_exists($config["site_path"].$settings["icons_folder"]."/".$icon_path))
$data["icon_path"] = $config["site_root"].$settings["icons_folder"]."/".$icon_path;
if($settings["photo_max_count"]>0) $data["addf_link"]="myprofile_upload.php?sel=photo";
if($settings["audio_max_count"]>0) $data["adda_link"]="myprofile_upload.php?sel=audio";
if($settings["video_max_count"]>0) $data["addv_link"]="myprofile_upload.php?sel=video";
$data["edit_link_1"] = "./myprofile.php?sel=1";
$data["edit_link_2"] = "./myprofile.php?sel=2";
$data["edit_link_3"] = "./myprofile.php?sel=3";
$smarty->assign("data", $data);
return;
}
Thank you very much for the information.