function getAllMyStaffNotes($userID, $branchID, $userlevel) { $conn = getConnection(); $list = array(); $obj = getBranch($branchID); if ($userlevel != 1) { $query = "SELECT * FROM notes WHERE activeflag<>0 AND type=3 AND batchID =" . $userID . " ORDER BY lastupdated DESC"; } else { $query = "SELECT * FROM notes WHERE activeflag<>0 AND type=3 ORDER BY lastupdated DESC"; } //echo $query; $result = mysql_query($query); while ($member = mysql_fetch_array($result)) { $temp = getNotes($member['ID']); array_push($list, $temp); } /* $batchlist=getAllActiveBatchesByBranch($obj); for($i=0;$i<count($batchlist);$i++) { $query = "SELECT * FROM notes WHERE activeflag<>0 AND batchID='".$batchlist[$i]->getID()."' AND type=2 ORDER BY lastupdated DESC"; //echo $query; $result = mysql_query($query); while($member = mysql_fetch_array($result)) { $temp = getNotes($member['ID']); array_push($list,$temp); } } */ if (count($list) != 0) { return $list; } return NULL; }
<td><small><?php echo getstate($row["state"]); ?> </small></td> <td><small><?php echo $row["activationDate"]; ?> </small></td> <td><small><?php echo gettelecallername($row["refferBy"]); ?> </small></td> <td><small> <?php if ($row["serviceBranch"] != NULL) { echo getBranch($row["serviceBranch"]); } else { echo "N/A"; } ?> </small></td> <td><small> <?php if ($row["areaManager"] != NULL) { echo gettelecallername($row["areaManager"]); } else { echo "N/A"; } ?> </small></td>
} switch ($action) { case 'install': $mod = getModinfo(); $installer = new sspmod_core_ModuleInstaller($mod); $installer->install(getBranch()); break; case 'remove': $mod = getModinfo(); $installer = new sspmod_core_ModuleInstaller($mod); $installer->remove(getBranch()); break; case 'upgrade': $mod = getModinfo(); $installer = new sspmod_core_ModuleInstaller($mod); $installer->upgrade(getBranch()); break; case 'upgrade-all': $mdir = scandir($config->getBaseDir() . 'modules/'); foreach ($mdir as $md) { if (!sspmod_core_ModuleDefinition::validId($md)) { continue; } if (!sspmod_core_ModuleDefinition::isDefined($md)) { continue; } $moduledef = sspmod_core_ModuleDefinition::load($md, 'remote'); $installer = new sspmod_core_ModuleInstaller($moduledef); if ($moduledef->updateExists() || $moduledef->alwaysUpdate()) { echo "Upgrading [" . $md . "]\n"; $installer->upgrade();
function updateBranch($branchID, $name, $activeflag, $id) { $conn = getConnection(); $Obj = getBranch($branchID); $Obj->setName($name); $Obj->setActiveFlag($activeflag); $Obj->setCreatedBy($id); $result = $Obj->update(); if ($result) { $message = "Branch Updated Successfully :" . $name; } else { $message = "Branch Updation Failed : " . $name; } return $message; }
function compareJSON() { return 'temp/compare.' . getBranch() . '.json'; }
<option value="">Select Branch</option> <?php $Country = mysql_query("select * from tblbranch"); while ($resultCountry = mysql_fetch_assoc($Country)) { ?> <option value="<?php echo $resultCountry['id']; ?> " <?php if (isset($result['id']) && $resultCountry['id'] == $result['LeadGenBranchId']) { ?> selected<?php } ?> ><?php echo getBranch(stripslashes(ucfirst($resultCountry['id']))); ?> </option> <?php } ?> </select></td> </tr> <tr> <td valign="top"> </td> </tr> <tr> <td>Telecaller Name*</td> <td valign="top" width="37%">
function getBranch($pages, $parent = null, $level = 1, $level_limit = 4) { $branch = NULL; if ($level > $level_limit) { return $branch; } foreach ($pages as $page) { if ($page['parent_id'] == $parent) { if (is_null($branch)) { $branch = array(); } $branch[$page['id']] = array('name' => $page['name'], 'parent' => array(), 'code' => $page['code'], 'title' => $page['title'], 'image' => $page['image_id'], 'short' => $page['short'], 'parent_id' => $page['parent_id'], 'active' => $page['active'], 'meta_keywords' => $page['meta_keywords'], 'meta_description' => $page['meta_description'], 'redirect' => $page['redirect'], 'hidden' => $page['hidden'], 'child' => getBranch($pages, $page['id'], $level + 1, $level_limit)); } } return $branch; }
} else { if ($row["T_status"] == 1) { echo "<span style='color:green; font-weight:bold;'>Closed</span>"; } else { if ($row["T_status"] == 2) { echo "<span style='color:orange; font-weight:bold;'>Reschedule</span>"; } } } ?> </td> <td><small><?php if ($row["B_name"] == "") { echo "<span style ='color:orange; font-weight:bold;'>Not Allocated</span>"; } else { echo getBranch(stripcslashes($row["B_name"])); } ?> </small></td> <td><small><?php if ($row["T_name"] == "") { echo "<span style ='color:orange; font-weight:bold;'>Not Allocated</span>"; } else { echo gettelecallername(stripcslashes($row["T_name"])); } ?> </small></td> <td><small><?php echo stripslashes($row["ap_date"]); ?> </small></td>
function getBestDisplay() { if ($this->branchID != 0) { return getBranch($this->branchID)->getName() . ' : ' . $this->name; } else { return 'All Branches : ' . $this->name; } }
} ?> " class="form-control text_box" readonly></td> <td>Lead Gen. Exe.</td> <td><input type="text" name="customer_name2" id="customer_name2" value="<?php if (isset($result['cust_id'])) { echo gettelecallername($result['telecaller_id']); } ?> " class="form-control text_box" readonly></td> </tr> <tr> <td height="34">Lead Gen. Branch</td> <td><input type="text" name="branch_id" id="branch_id" value="<?php if (isset($result['cust_id'])) { echo getBranch($result['branch_id']); } ?> " class="form-control text_box" readonly></td> <td> </td> <td> </td> </tr> <tr> <td height="34">Serivce Branch</td> <td> <select name="service_branch" id="service_branch" class="form-control drop_down"> <option value="">Select Techician</option> <?php $Country = mysql_query("select * from tblbranch"); while ($resultCountry = mysql_fetch_assoc($Country)) { ?>
} $textwithlinks .= "</tr>\n"; } $textwithlinks .= "</table>\n"; } if ($cleantext != "" && isset($_REQUEST['pastebin'])) { $url = pastebin($cleantext, $name); $pastebin = "Pastebin url: <a href=\"{$url}\" target=\"_blank\">{$url}</a>"; } $cleantext = "<h1>translated for copy and paste</h1>\n<pre>{$cleantext}</pre>"; return array('PASTEBIN' => $pastebin, 'RESULTCLEAN' => $cleantext, 'RESULTHTML' => $textwithlinks); } $res['PASTEBIN'] = ""; /*initianlize vars for template*/ $res['RESULTHTML'] = ""; $res['RESULTCLEAN'] = ""; $res['TEXTAREA'] = getinfolog(); $res['TRANSLATOR'] = "http://springrts.com:8000"; $res['INFO'] = ""; if ($res['TEXTAREA'] != "") { limit(); $tmp = xmlrpcrequest($res['TRANSLATOR'], $res['TEXTAREA']); /* if (array_key_exists('faultString',$tmp)){ $res['INFO']="<h1>Warning: using local translator, as remote can't translate</h1>"; $res['TRANSLATOR']="http://abma.de:8000"; $tmp=xmlrpcrequest($res['TRANSLATOR'],$res['TEXTAREA']); }*/ $res = array_merge($res, parse_result($tmp, getVersion($res['TEXTAREA']), getCommit($res['TEXTAREA']), getBranch($res['TEXTAREA']))); } $res['ACTION'] = $_SERVER['SCRIPT_NAME']; echo parse_template("index.tpl", $res);
?> .</td> <td><?php echo getdevicename(stripslashes($row["device_name"])); ?> </td> <td><?php echo stripslashes($row["device_id"]); ?> </td> <td><?php echo getdeviceimei(stripslashes($row["device_id"])); ?> </td> <td><?php echo getBranch(stripslashes($row["branch_id"])); ?> </td> <td><input type='checkbox' name='linkID[]' id="linkID" value='<?php echo $row["device_id"]; ?> '></td> </tr> <?php } } else { echo "<tr><td colspan=6 align=center><h3 class='color:red'>No records found!</h3></td><tr/></table><br>"; } ?> <form method="post">
function read() { $conn = getConnection(); $query = "SELECT * FROM student WHERE ID='" . $this->ID . "'"; $result = mysql_query($query); if (!$result) { return; } else { $member = mysql_fetch_array($result); $this->setMainID(trim($member['mainID'])); $this->setRollNo(trim($member['rollno'])); $this->setGRno(trim($member['grno'])); $this->setFirstName(trim($member['firstname'])); $this->setLastName(trim($member['lastname'])); $this->setFname(trim($member['Fname'])); $this->setBatchObj(getBatch($member['batchID'])); $this->setExamYear(trim($member['examyear'])); $this->setActiveFlag(trim($member['activeflag'])); $this->setClassObj(getBatchClass($member['classID'])); $this->BranchObj = getBranch($this->getBatchObj()->getID()); $this->setLoginFlag(trim($member['loginflag'])); } }