Şuanki Dizin: /home/wwwdreamtechnolo/public_html/panel.atsevairag.com/atse_admin_panel007/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/panel.atsevairag.com/atse_admin_panel007/staff-members.php |
<?php require_once("../lib/class/functions.php"); $db = new functions(); if (isset($_SESSION['current_admn_email']) && isset($_SESSION['current_login_user_type'])) { $session_email = $_SESSION['current_admn_email']; $atse_year = $_SESSION['current_atse_year']; $user_type = $_SESSION['current_login_user_type']; } $current_page = "add_staff_member"; if(!isset($_SESSION['current_admn_email'])) { header("Location:/atse_admin_panel007/index.php"); } if(isset($_GET['del_id'])) { $delete_id = $_GET['del_id']; $db->delete_staff_from_id($delete_id); } $address_error = ""; $contact_number_error= ""; $email_id_error = ""; $flag = 0; $success_msg = 0; $contact_person_name_error = ""; $school_name_error = ""; $userid_error = ""; $school_name = ""; $address = ""; $contact_number = ""; $email_id = ""; $contact_person_name = ""; $userid = ""; $password = ""; $error_added_by = ""; $added_by = ""; $center_name = ""; $contact_number2= ""; if(isset($_POST['add_centre_btn'])) { $center_name = "";//$_POST['center_name']; $school_name = "";//$_POST['school_name']; $added_by = $_SESSION['current_admn_email']; $address = $_POST['address']; $contact_number = $_POST['contact_no']; $contact_number2= $_POST['contact_no2']; $email_id = $_POST['email_id']; $contact_person_name = $_POST['contact_person_name']; $userid = $_POST['userid']; $password = $_POST['password']; if($address=="") { $address_error = "कृपया पत्ता लिहा."; $flag = 1; } if($contact_person_name=="") { $contact_person_name_error = "कृपया संपर्क व्यक्तीचे नाव लिहा"; $flag = 1; } if($contact_number=="") { $contact_number_error = "कृपया मोबार्इल क्रमांक लिहा "; $flag = 1; } else if(!is_numeric($contact_number)) { $contact_number_error = "कृपया बरोबर मोबार्इल क्रमांक लिहा"; $flag = 1; } else if(strlen($contact_number)>10 OR strlen($contact_number)<10) { $contact_number_error = "कृपया बरोबर मोबार्इल क्रमांक लिहा"; $flag = 1; } /*if($school_name=="शाळा निवडा") { $school_name_error = "शाळेचे नाव निवडा"; $flag = 1; }*/ if($userid=="") { $userid_error = "कृपया युजर आयडी लिहा"; $flag = 1; } if($added_by=="") { $added_by_error = "कृपया समन्वयकचे नाव लिहा"; $flag = 1; } if($flag=="0") { $check_userid_exist = $db->check_staff_member_userid_exist($userid); if($check_userid_exist=="") { if($db->add_new_staff_member_data($school_name,$contact_person_name,$address,$contact_number,$email_id,$userid,$password,$added_by,$center_name,$contact_number2)) { $success_msg = 1; $school_name = ""; $address = ""; $contact_number = ""; $email_id = ""; $contact_person_name = ""; $userid = ""; $password = ""; } } else { $userid_error = "युजर आयडी ऑलरेडी जतन आहे "; $flag = 1; } } } ?> <html> <head> <meta charset="UTF-8"> <title>ATSE Vairag</title> <link rel="stylesheet" type="text/css" href="/css/stylesheet.css" /> <script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script> </head> <body> <?php require_once('header.php'); ?> <div style="min-height:570px;"> <div class="admin-mid-section"> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <br /> <center><strong>स्टाफ नोंद करा</strong></center> <hr /> <div class="add_centre_container"> <?php if($success_msg=="1") { ?> <div class="add_centre_success"> नवीन स्टाफची नोंद झाली आहे </div> <?php } ?> <!--<select name="center_name" class="txtflds"> <?php $centres_list = array(); $centres_list = $db->get_all_added_centres(); if(!empty($centres_list)) { ?> <option value="केंद्र निवडा">केंद्र निवडा</option> <?php $count = 0; foreach($centres_list as $centre) { $id = $centres_list[$count][0]; $c_name= $centres_list[$count][1]; ?> <option value="<?php echo $id; ?>" <?php if($center_name==$id){ ?>selected<?php } ?>><?php echo $c_name; ?></option> <?php $count++; } } else { ?> <option value="कोणत्याही शाळेची नोंद केलेली नाही ">कोणत्याही केंद्राची नोंद केलेली नाही</option> <?php } ?> </select>--> <!--<select name="school_name" class="txtflds"> <?php $centres_list = array(); $centres_list = $db->get_all_added_schools(); if(!empty($centres_list)) { ?> <option value="शाळा निवडा">शाळा निवडा</option> <?php $count = 0; foreach($centres_list as $centre) { $id = $centres_list[$count][0]; $center_name= $centres_list[$count][1]; ?> <option value="<?php echo $id; ?>" <?php if($school_name==$id){ ?>selected<?php } ?>><?php echo $center_name; ?></option> <?php $count++; } } else { ?> <option value="कोणत्याही शाळेची नोंद केलेली नाही ">कोणत्याही शाळेची नोंद केलेली नाही</option> <?php } ?> </select> <span class="error_indicator"><?php echo $school_name_error; ?></span> <input type="text" name="added_by" id="added_by" class="txtflds" placeholder="ऍड बाय" value="<?php echo $added_by; ?>" required /> <span class="error_indicator" style="margin:0px;"><?php echo $error_added_by; ?></span> --> <input type="text" name="contact_person_name" id="contact_person_name" class="txtflds" placeholder="स्टाफचे नाव" value="<?php echo $contact_person_name; ?>" required /> <span class="error_indicator"><?php echo $contact_person_name_error; ?></span> <textarea type="text" id="address" name="address" class="txtflds" style="height:80px;" placeholder="पत्ता" required><?php echo $address; ?></textarea> <span class="error_indicator"><?php echo $address_error; ?></span> <input type="text" name="contact_no" id="contact_no" class="txtflds" placeholder="संपर्क नंबर " value="<?php echo $contact_number; ?>" required /> <span class="error_indicator"><?php echo $contact_number_error; ?></span> <input type="text" name="contact_no2" id="contact_no2" class="txtflds" placeholder="संपर्क नंबर 2" value="<?php echo $contact_number2; ?>" required /> <span class="error_indicator"><?php echo $contact_number_error; ?></span> <input type="email" name="email_id" id="email_id" class="txtflds" placeholder="इमेल आय-डी (optional)" value="<?php echo $email_id; ?>" /> <span class="error_indicator"><?php echo $email_id_error; ?></span> <input type="text" name="userid" id="userid" class="txtflds" placeholder="युजर आयडी" value="<?php echo $userid; ?>" required /> <span class="error_indicator"><?php echo $userid_error; ?></span> <?php function generateRandomString($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; } return $randomString; } $current_random_string = generateRandomString(); ?> <label style="float:left;">Password : </label> <input type="text" name="password" id="password" class="txtflds" placeholder="पासवर्ड" value="<?php echo $current_random_string; ?>" required /> <br /> <br /> <center><input type="submit" name="add_centre_btn" value="प्रतिनिधींची नोंद करा" id="send_form" class="reg_btn_form" style="width:160px;" /></center> </div> </form> <br /> <div style="min-height:570px;"> <div class="admin-mid-section"> <br /> <center><strong>केंद्राची लिस्ट</strong></center> <hr /> <table class="centre_tab" border="1" cellspacing="0"> <tr style="background-color:#EFEFEF;"> <td width="50">अ. क्र.</td> <td width="100">ऍड बाय</td> <td width="200">स्टाफचे नाव</td> <td width="200">पत्ता</td> <td width="120">मोबाईल नंबर</td> <td width="120">मोबाईल नंबर2</td> <td width="120">ईमेल आयडी</td> <td width="120">युजर आयडी</td> <td width="120">पासवर्ड</td> <td width="120">दिनांक</td> <td width="">वेळ </td> <td width="">Edit</td> <?php if($_SESSION['current_login_user_type']=="admin") { ?> <td width="20">Delete</td> <?php } ?> </tr> <?php if($_SESSION['current_login_user_type']=="admin") { $members_data = array(); $members_data = $db->get_all_main_staff_member_data(); if(!empty($members_data)) { $count = 0; foreach($members_data as $data) { $id = $members_data[$count][0]; $member_name= $members_data[$count][1]; $address = $members_data[$count][2]; $contact_no = $members_data[$count][3]; $email_id = $members_data[$count][4]; $user_id = $members_data[$count][5]; $password = $members_data[$count][6]; $added_by = $members_data[$count][7]; $center = $members_data[$count][8]; $school = $members_data[$count][9]; $contact_2 = $members_data[$count][10]; $date = $members_data[$count][11]; $time = $members_data[$count][12]; ?> <tr> <td width=""><?php echo $id; ?></td> <td width=""><?php echo $added_by; ?></td> <td width=""><?php echo $member_name; ?></td> <td width=""><?php echo $address; ?></td> <td width=""><?php echo $contact_no; ?></td> <td width=""><?php echo $contact_2; ?></td> <td width=""><?php echo $email_id; ?></td> <td width=""><?php echo $user_id; ?></td> <td width=""><?php echo $password; ?></td> <td width=""><?php echo $date; ?></td> <td width=""><?php echo $time; ?> </td> <td width="60"><a href="edit-member.php?edt_center_id=<?php echo $id; ?>">Edit</a></td> <?php if($_SESSION['current_login_user_type']=="admin") { ?> <td width=""><a href="<?php echo $_SERVER['PHP_SELF']."?del_id=".$id; ?>" class="delete_link_report" id="news_delete_link">Delete</a></td> <?php } ?> </tr> <?php $count++; } } else { ?> <tr> <td colspan="10">कोणतेही केंद्र नोंद केलेले नाही</td> </tr> <?php } } else if ($_SESSION['current_login_user_type'] == "Pratinidhi") { $members_data = array(); $members_data = $db->get_all_main_staff_member_data_for_prathinidhi($session_email); if(!empty($members_data)) { $count = 0; foreach($members_data as $data) { $id = $members_data[$count][0]; $member_name= $members_data[$count][1]; $address = $members_data[$count][2]; $contact_no = $members_data[$count][3]; $email_id = $members_data[$count][4]; $user_id = $members_data[$count][5]; $password = $members_data[$count][6]; $added_by = $members_data[$count][7]; $center = $members_data[$count][8]; $school = $members_data[$count][9]; $contact_2 = $members_data[$count][10]; $date = $members_data[$count][11]; $time = $members_data[$count][12]; ?> <tr> <td width=""><?php echo $id; ?></td> <td width=""><?php echo $added_by; ?></td> <td width=""><?php echo $member_name; ?></td> <td width=""><?php echo $address; ?></td> <td width=""><?php echo $contact_no; ?></td> <td width=""><?php echo $contact_2; ?></td> <td width=""><?php echo $email_id; ?></td> <td width=""><?php echo $user_id; ?></td> <td width=""><?php echo $password; ?></td> <td width=""><?php echo $date; ?></td> <td width=""><?php echo $time; ?> </td> <td width="60"><a href="edit-member.php?edt_center_id=<?php echo $id; ?>">Edit</a></td> <?php if ($_SESSION['current_login_user_type'] == "admin") { ?> <td width=""><a href="<?php echo $_SERVER['PHP_SELF']."?del_id=".$id; ?>" class="delete_link_report" id="news_delete_link">Delete</a></td> <?php } ?> </tr> <?php } } else { echo '<tr><td colspan="12">कोणतेही केंद्र नोंद केलेले नाही</td></tr>'; // No centers found } } ?> </table> </div> </div> <br /><br /> </div> </div> <?php require_once('footer.php'); ?> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4