<?php session_start(); //including required classes include '../classes/CafeDetails.php'; include '../classes/CafeMgmt.php'; //getting user id from session $session_id = $_SESSION['session_id']; $user_id = $_SESSION['user_id']; //creating object of class cafe details $cafe_details = new CafeDetails(); //creating object of class cafemgmt $cafe_mgmt = new CafeMgmt(); //getting post values in the variables $salutation = $_POST['salutation']; $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $office_phone = $_POST['office_phone']; $cafe_name = $_POST['cafe_name']; $mobile = $_POST['mobile']; $email = $_POST['email']; $address = $_POST['address']; $state = $_POST['state']; $city = $_POST['city']; $country = $_POST['country']; $postal_code = $_POST['postal_code']; $area = $_POST['area1']; $terminals = $_POST['terminals']; $internet_provider = $_POST['internet_provider']; $connection_details = $_POST['connection_details']; $cafeisp = $_POST['cafe_isp'];
<?php //including session session_start(); $session_id = $_SESSION['session_id']; //including classes include '../classes/CafeMgmt.php'; include '../classes/CafeDetails.php'; include '../classes/SugarSoap.php'; //creating objects $cafe_mgmt = new CafeMgmt(); $cafe_details = new CafeDetails(); $sugar_soap = new SugarSoap(); //getting values from post $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $department = $_POST['department']; $role_id = $_POST['role']; $counttry = $_POST['country']; $state = $_POST['state']; $city = $_POST['city']; $reports_to_id = $_SESSION['user_id']; $name = $first_name . ' ' . $last_name; if ($session_id) { if ($cafedb_result = $cafe_details->insertEmp($name, $city)) { $id = $cafe_details->getMaxEmployeeId(); $user_id = generateUserId($city, $id); //calling function to enter values in sugar crm, using soap $sugar_result = $sugar_soap->insertEmployee($session_id, $user_id, $first_name, $last_name, $department, $country, $state, $city, $phone_mobile, $reports_to_id); } else { echo 'can not insert in database';
<?php include "../templates/header_session.php"; include "../templates/header.php"; //including classes include '../classes/CafeMgmt.php'; $em_db_uid = $_POST['db_user']; $em_inst_uid = $_POST['inst_user']; $em_mnt_uid = $_POST['mnt_user']; //creating objects $cafe_mgmt = new CafeMgmt(); $result = $cafe_mgmt->createUpdateAssignUser($em_db_uid, $em_inst_uid, $em_mnt_uid); //$msg = ''; if ($result) { $msg = 'Assignment Confirmed'; } else { $msg = 'Assign Not Confirmed'; } ?> <body> <div id="topPan"><div id="ImgPan"><a href="index.html"><img src="../images/logo.gif" title="Coporate Profiles" alt="Coporate Profiles" width="201" height="52" border="0" /></a></div> <?php include "nav_bar.php"; ?> </div> <div id="bodyPan"> <p class="toptextpadding"> <?php echo $msg;
<?php session_start(); define('sugarEntry', TRUE); //Use the NuSOAP files require_once '../classes/lib/nusoap.php'; //including CafeMgmt Class include '../classes/CafeMgmt.php'; //creating object of class cafemgmt $cafe_mgmt = new CafeMgmt(); //soap client object $soapclient = new nusoap_client('http://208.109.162.122/cafemgmt/soap.php?wsdl', true); $user_name = $_POST['username']; $pass_word = $_POST['password']; $user_auth = array('user_auth' => array('user_name' => $user_name, 'password' => md5($pass_word), 'version' => '0.1'), 'application_name' => 'soapleadcapture'); $result_array = $soapclient->call('login', $user_auth); var_dump($result_array); if ($result_array) { if ($result_array['id'] == -1) { header("Location: login.php"); } else { //assigning session values $_SESSION['session_id'] = $result_array['id']; $user_guid = $soapclient->call('get_user_id', $_SESSION['session_id']); $_SESSION['user_id'] = $user_guid; $_SESSION['user_name'] = $user_name; //getting role id of the user $role_id = $cafe_mgmt->getEmUserRoleId($user_guid); //checking role id switch ($role_id) { //if user id is of operational database team
<?php /* * including Classes */ include "../classes/CafeActivation.php"; include "../classes/CafeMgmt.php"; /* * creating objects * objects for the above classes */ $cafe_act = new CafeActivation(); $cafe_mgmt = new CafeMgmt(); /* * get yesterdays d */ $yesterday = $_REQUEST['date']; //date("Y-m-d",mktime(0,0,0,date("m") ,date("d")-1,date("Y"))); /* * gettingvalues in result array */ $result = $cafe_act->getInstalledCafe($yesterday); $num = mysql_num_rows($result); ?> <h4>Number of screens Installed today: <?php echo $num; ?> </h4><table width="973" border="1"><tr><td>Cafe Id</td><td>Mac Id</td><td>Installed By</td><td>Time</td></tr> <?php while ($row = mysql_fetch_array($result)) { echo ' <tr>';
<?php include "../templates/header_session.php"; include "../templates/header.php"; //including Classes include '../classes/CafeDetails.php'; include '../classes/CafeMgmt.php'; ///creating objects $cafe_mgmt = new CafeMgmt(); $cafe_details = new CafeDetails(); $rs_employee = $cafe_mgmt->getEmployeeDetails(); ?> <body> <div id="topPan"><div id="ImgPan"><a href="index.html"><img src="../images/logo.gif" title="Coporate Profiles" alt="Coporate Profiles" width="201" height="52" border="0" /></a></div> <?php include "nav_bar.php"; ?> </div> <div id="bodyPan"> <center> <p>Employees List </p> <p> </p> <table width="764" border="1"> <tr> <td width="90">User Id</td> <td width="87">Name</td> <td width="90">City</td> <td width="134">Department</td> <td width="110">Role</td> <td width="83">View Details</td>
<?php include "../templates/header_session.php"; include "../templates/header.php"; $city_id = $_GET['city_id']; //including classes include '../classes/CafeDetails.php'; include '../classes/CafeMgmt.php'; //creating objects $cafe_details = new CafeDetails(); $cafe_mgmt = new CafeMgmt(); //gettting city name $city_name = $cafe_details->getCityName($city_id); $emp_rs = $cafe_mgmt->getListOfEmpByCity($city_id); ?> <body> <div id="topPan"><div id="ImgPan"><a href="index.html"><img src="../images/logo.gif" title="Coporate Profiles" alt="Coporate Profiles" width="201" height="52" border="0" /></a></div> <?php include "nav_bar.php"; ?> </div> <div id="bodyPan"> <p class="toptextpadding">Details of <?php echo $city_name; ?> </p> <p class="toptextpadding"> List of Employees in this city </p> <p class="toptextpadding"> <?php