HEX
Server: Apache
System: Linux xmf17.cloudnstools.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User: pricecom (1134)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/pricecom/public_html/phonerepair/user_profiles.php
<?php 
	include('include/files.php');
	
	$imageName=$user_id."-".time();
	$module=1;
	include('include/user_rights.php');
	
	$file_extensions="jpg, gif, bmp, png";

?>

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $site_settings['title']; ?> - Admin Panel</title>
<link href="styles/style.css" rel="stylesheet" type="text/css" />
<script src="include/javascriptfunctions.js"></script>
<script src="ajaxscript.js"></script> 
</head>
<body>
     <table cellpadding="0" cellspacing="0" border="0" align="center">
    	<tr>
            <td>
            	<table cellpadding="0" cellspacing="0" border="0" width="918">
                	<?php include('include/header.php'); ?>
					<tr>
                    	<td>
                        	<table cellpadding="0" cellspacing="0" border="0">
                            	<tr>
                                    <td valign="top">
                                    	<table cellpadding="0" cellspacing="0" border="0">
                                        	<tr>
                                            	<td bgcolor="#FFFFFF" width="100%" height="" class="bor" valign="top">
                                                	<table cellpadding="4" cellspacing="0" border="0" width="918">
														
														
                                                        <tr>
                    	<td>
                        	<table cellpadding="0" cellspacing="0" align="center" width="100%">
                                <tr><td height="25"></td></tr>
                                
					<tr>
                    	<td width="30"></td>
                    	 
                        <td valign="top">
                        	<table cellpadding="0" cellspacing="0" align="center" width="700">
                                    <tr>
                                        <td colspan="5" class="abouthd">Registration Management</td>
                                    </tr>
                                <tr><td height="10"></td></tr>
                                <tr>
                                	<Td valign="top">
                                    	<table cellpadding="0" cellspacing="0" border="0" width="100%">
                        	<tr>
                            	<td>
                                	<?php
									  ################################################################################   
									  ## +---------------------------------------------------------------------------+
									  ## | 1. Creating & Calling:                                                    | 
									  ## +---------------------------------------------------------------------------+
									  ##  *** define a relative (virtual) path to datagrid.class.php file
									  ##  *** (relatively to the current file)
									  ##  *** RELATIVE PATH ONLY ***     
										define("DATAGRID_DIR", "");                     /* Ex.: "datagrid/" */ 
										require_once(DATAGRID_DIR.'datagrid.class.php');
									
										// includes database connection parameters
										include_once('install/config.inc.php');
										
										ob_start();      
									  ##  *** set needed options
										$debug_mode = true;
										$messaging = true;
										$unique_prefix = "f_";  
										
										$postback   = (isset($_REQUEST['postback']) && $_REQUEST['postback'] != "") ? strip_tags($_REQUEST['postback']) : "ajax";
   										$mode       = isset($_REQUEST[$unique_prefix.'mode']) ? $_REQUEST[$unique_prefix.'mode'] : "";    

										$dgrid = new DataGrid($debug_mode, $messaging, $unique_prefix);
										
										## *** defines postback method for DataGrid: AJAX, POST(default) or GET
										$postback_method = 'AJAX';
										$dgrid->SetPostBackMethod($postback_method);
										
										## *** make sure your tmp/cache/ dir has 755 (write) permissions
										## *** parameters: 1st - allow caching, 2nd - cache lifetime in minutes
										//$dgrid->SetCachingParameters(true, 5);
										## *** delete all caching pages
										/// $dgrid->DeleteCache();
									
										## *** datagrid layouts: '0' - tabular(horizontal) - default, '1' - columnar(vertical), '2' - customized
										## *** use 'view'=>'0' and "edit"=>"0" only if you work on the same tables
										## *** filter layouts: '0' - tabular(horizontal) - default, '1' - columnar(vertical), '2' - advanced(inline)
										//$layouts = array('view'=>2, 'edit'=>1, 'filter'=>1); 
										//$dgrid->SetLayouts($layouts);
									
									
										## *** set modes for operations ('type' = 'link|button|image'),
										## *** set CSS class for datagrid
										## *** 'default|blue|gray|green|pink|empty|x-blue|x-gray|x-green' or your own css style
										$css_class = $css_co; 
										$dgrid->SetCssClass($css_class);
									
										# *** set modes for operations ('type' = 'link|button|image'),
										## *** 'view' - view mode | 'edit' - add/edit/details modes
										## *** ('byFieldValue' - make the field as a link to edit mode page)
										## *** 'show_button' - specifies to show mode button or not
										
										$modes = array(
										  'add' => array('view'=>$right_add, 'edit'=>false, 'type'=>'link', 'show_button'=>true, 'show_add_button'=>'inside|outside'),
										  'edit' => array('view'=>$right_edit, 'edit'=>true, 'type'=>'link', 'show_button'=>true, 'byFieldValue'=>''),
										  'details' => array('view'=>$right_view, 'edit'=>false, 'type'=>'link', 'show_button'=>true),
										 
										  'delete' => array('view'=>$right_del, 'edit'=>false, 'type'=>'image', 'show_button'=>true)
										);
										$dgrid->SetModes($modes);
									
									  ##  *** set data source with needed options
									  ##  *** put a primary key on the first place 
										$sql=" SELECT "  
										." user_profiles.uid, "
										." CONCAT(user_profiles.f_name, ' ' ,user_profiles.l_name) as userName, "
										." content_pages.eng_title, "
										." user_profiles.email, "
										." user_profiles.address, "
										." user_profiles.phone, "
										." user_profiles.ip_address, "
										." DATE_FORMAT(user_profiles.reg_date, '%d/%M/%Y') as  reg_date "
										."FROM user_profiles, content_pages where
										   user_profiles.cpid = content_pages.cpid";          
										
										$default_order = array("uid"=>"DESC");
										$dgrid->DataSource("PEAR", "mysql", $DB_HOST, $DB_NAME, $DB_USER, $DB_PASS, $sql, $default_order);             
									
										$dg_caption = '';
										$dgrid->SetCaption($dg_caption);
										
										## *** set filtering option: true or false(default)
										## *** tips: use ',' (comma) if you want to make search by some words, for ex.: hello, bye, hi
										$filtering_option = true;
										$show_search_type = true;
										$dgrid->AllowFiltering($filtering_option, $show_search_type);
										$filtering_fields = array(
     "Enter Title"=>array("type"=>"textbox",      "table"=>"user_profiles", "field"=>"company", "filter_condition"=>"", "show_operator"=>"false", "default_operator"=>"%like%", "case_sensitive"=>"false", "comparison_type"=>"string|numeric|binary", "width"=>"", "on_js_event"=>"", "default"=>""),
	 									);
	 
	 									$dgrid->SetFieldsFiltering($filtering_fields);
										
										 ##  *** Data Arrays
										 
										 $fill_yes_no_array = array("1"=>"Yes", "0"=>"No");
										 
									  ## +---------------------------------------------------------------------------+
									  ## | 6. View Mode Settings:                                                    | 
									  ## +---------------------------------------------------------------------------+
									  ##  *** set columns in view mode
										$dgrid->SetAutoColumnsInViewMode(true);  
										
										 $vm_table_properties = array("width"=>"90%");
    									 $dgrid->SetViewModeTableProperties($vm_table_properties);  
										 ##  *** set columns in view mode
										 
										  $vm_colimns = array(
	  "uid"     => array("header"=>"User Id", "type"=>"linktoview",      "align"=>"center", "width"=>"200px", "wrap"=>"wrap", "text_length"=>"-1", "tooltip"=>"false", "tooltip_type"=>"floating|simple", "case"=>"normal", "summarize"=>"false", "sort_type"=>"numeric", "sort_by"=>"", "visible"=>"true", "on_js_event"=>""),

	 "userName"     => array("header"=>"Name", "type"=>"text",      "align"=>"center", "width"=>"350px", "wrap"=>"wrap", "text_length"=>"-1", "tooltip"=>"false", "tooltip_type"=>"floating|simple", "case"=>"normal", "summarize"=>"false", "sort_type"=>"numeric", "sort_by"=>"", "visible"=>"true", "on_js_event"=>""),
	 
	 
	 "eng_title"     => array("header"=>"Course Title", "type"=>"text",      "align"=>"center", "width"=>"350px", "wrap"=>"wrap", "text_length"=>"-1", "tooltip"=>"false", "tooltip_type"=>"floating|simple", "case"=>"normal", "summarize"=>"false", "sort_type"=>"numeric", "sort_by"=>"", "visible"=>"true", "on_js_event"=>""),
	 
	 "reg_date"     => array("header"=>"Reg Date", "type"=>"text",      "align"=>"center", "width"=>"350px", "wrap"=>"wrap", "text_length"=>"-1", "tooltip"=>"false", "tooltip_type"=>"floating|simple", "case"=>"normal", "summarize"=>"false", "sort_type"=>"numeric", "sort_by"=>"", "visible"=>"true", "on_js_event"=>""),
	 


	 														);
	  
	 								  $dgrid->SetColumnsInViewMode($vm_colimns);    
										 
										
										

										## *** set foreign keys for add/edit/details modes (if there are linked tables)
										## *** Ex.: 'condition'=>'Table_1.FieldName > "a" AND Table_1.FieldName < "c"'
										## *** Ex.: 'on_js_event'=>'onclick="alert(\'Yes!!!\');"'
										$foreign_keys = array(
										
										"cpid" =>array("table"=>"content_pages", "field_key"=>"cpid", "field_name"=>"eng_title", "view_type"=>"dropdownlist", "elements_alignment"=>"horizontal|vertical", "condition"=>" cid not in(1,7,8,9)", "order_by_field"=>"eng_title", "order_type"=>"ASC", "show_count"=>"true"),
										


										);
										$dgrid->SetForeignKeysEdit($foreign_keys);
									
										
										

			
									  ## +---------------------------------------------------------------------------+
									  ## | 7. Add/Edit/Details Mode settings:                                        | 
									  ## +---------------------------------------------------------------------------+
									  ##  ***  set settings for edit/details mode
									    ##  *** set add/edit mode table properties
										$em_table_properties = array("width"=>"60%");
										$dgrid->SetEditModeTableProperties($em_table_properties);
									  ##  *** set details mode table properties
										$dm_table_properties = array("width"=>"60%");
										$dgrid->SetDetailsModeTableProperties($dm_table_properties);
										
										$dgrid->firstFieldFocusAllowed = true;
									  
										$table_name = "user_profiles";
										$primary_key = "uid";
										$condition = "";
										$dgrid->SetTableEdit($table_name, $primary_key, $condition);
										$dgrid->SetAutoColumnsInEditMode(true);
										
										$em_columns = array(
			
										
										"reg_date" =>array("header"=>"", "type"=>"hidden", "req_type"=>"st", "default"=>date("Y-m-d H:i:s"), "value"=>date("Y-m-d H:i:s"), "unique"=>"false", "visible"=>"false"),
										
										
										"cpid" =>array("header"=>"Course Title", "type"=>"foreign_key", "req_type"=>"ri", "width"=>"325px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>""),


										"f_name" =>array("header"=>"First Name", "type"=>"textbox", "aligh"=>"left", "req_type"=>"ry", "width"=>"325px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>""),

										"l_name" =>array("header"=>"Last Name", "type"=>"textbox", "aligh"=>"left", "req_type"=>"ry", "width"=>"325px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>""),
										
										"address" =>array("header"=>"Address", "type"=>"textbox", "aligh"=>"left", "req_type"=>"sy", "width"=>"325px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>""),
										
										"phone" =>array("header"=>"Phone #", "type"=>"textbox", "aligh"=>"left", "req_type"=>"sy", "width"=>"325px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>""),
										
										"email" =>array("header"=>"Email", "type"=>"textbox", "aligh"=>"left", "req_type"=>"se", "width"=>"325px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>"", 'validation_type'=>'email'),
										

									
										"details" =>array("header"=>"Details", "type"=>"textarea", "aligh"=>"left", "req_type"=>"sy", "width"=>"325px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>""),
										

										"us_active" =>array("header"=>"Active", "type"=>"enum", "aligh"=>"left", "req_type"=>"rt", "width"=>"325px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"Pakistan", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>"", "source"=>$fill_yes_no_array),

										);
										
										
										 $dgrid->SetColumnsInEditMode($em_columns);
										
										 ## *** set printing option: true(default) or false 
										$printing_option = true;
										$dgrid->AllowPrinting($printing_option); 
										
										## *** initialize the session with session_start();
										## *** default exporting directory (requires write permissions): tmp/export/
										$exporting_option = false;
										$export_all = false;
										$dgrid->AllowExporting($exporting_option, $export_all);
										$exporting_types = array(
											'csv'=>'false', 'xls'=>'false', 'pdf'=>'false', 'xml'=>'false', 'doc'=>'false'
										);
										$dgrid->AllowExportingTypes($exporting_types);

									  ## +---------------------------------------------------------------------------+
									  ## | 8. Bind the DataGrid:                                                     | 
									  ## +---------------------------------------------------------------------------+
									  ##  *** set debug mode & messaging options
										$dgrid->Bind();        
										
										
										ob_end_flush();
										
									?>
                                </td>
                            </tr>
                        </table>
                                    </Td>
                                </tr>
                            </table>
                        </td>	
                       
                    </tr>
                    <tr><td height="25"></td></tr>
                            </table>
                        </td>	
                    </tr>
                                                    </table>
                                                </td>
												<td width="15"></td>
                                            </tr>
                                        </table>
                                    </td>
                                   
                                    
                                </tr>
                            </table>
                        </td>
                    </tr>                    
                    <tr><td height="22"></td></tr>
                    
                     <td><?php include('include/footer.php'); ?></td>
                    
                    <tr><td height="20"></td></tr>
                    
                    
                </table>
            </td>
         </tr>
    </table>
</body>
</html>