function show_search_form() { echo box_start("Registrer donasjon - Søk etter bruker", "small") . ' <form action="" method="post"> <dl class="dd_right"> <dt><input type="text" class="styled w150" name="value" value="' . htmlspecialchars(postval("value")) . '" /></dt> <dd>' . show_sbutton("ID", 'name="id"') . ' ' . show_sbutton("Bruker", 'name="user"') . ' ' . show_sbutton("E-post", 'name="email"') . '</dd> </dl> </form>' . box_end(); }
<?php require "header.php"; function mysqli_result($res, $row, $field = 0) { $res->data_seek($row); $datarow = $res->fetch_array(); return $datarow[$field]; } if (!isset($_POST['jobid'])) { echo "<br />"; box_start(500); ?> <center> <h3>Search for contact rate</h3> <form action = "report_contact_rate.php" method="post"> Job Name: <select name="jobid"> <?php $result = mysqli_query($connection, "SELECT id, name FROM jobs"); while ($row = mysqli_fetch_assoc($result)) { print_pre($row); echo '<option value="' . $row['id'] . '">' . $row['name'] . '</option>'; } ?> </select><br /> Time Period:<select name="range" id="range"> <option value="alltime">All Time</option> <?php /*<option value="today">Today</option> <option value="date">Select Date</option>*/ ?>
function display_dispositions() { global $connection; if (!isset($_GET['disposition_set'])) { if (!isset($_GET['user_id'])) { $_GET['user_id'] = $_SESSION['user_id']; } $sql = "SELECT * FROM job_members, jobs WHERE job_members.job_id = jobs.id and job_members.user_id = " . sanitize($_GET['user_id']); $result = mysqli_query($connection, $sql); if ($result && mysqli_num_rows($result) > 0) { $row2 = mysqli_fetch_assoc($result); $result_dispositions = mysqli_query($connection, "SELECT * FROM job_dispositions WHERE job_id = " . $row2['job_id']); if (mysqli_num_rows($result_dispositions) == 0) { } else { $x = 0; //echo "<table id=\"dispositions\">"; $closed = false; // Add disposition for rescheduling a call //echo "<tr>"; $x++; //echo "<td>"; echo '<button class="button_reschedule" onclick="reschedule();">'; //box_start(145); //echo "<center>"; /*?> <img src = "images/clock.png" alt="Reschedule Call"> <?*/ echo "Reschedule Call"; //box_end(); echo '</button>'; //echo "</td>"; while ($rowx = mysqli_fetch_assoc($result_dispositions)) { if ($x == 0) { //echo "<tr>"; $closed = false; } $x++; //echo "<td>"; /* When you click a dispostion you need to do the following: 1. Check the current record is in the database ($row['new'] != 1) 2. Add an interraction for the current record 3. Remove the dispositions */ echo '<button class="buttonx" onclick="save_disposition(\'' . $rowx['id'] . '\');jQuery(\'#dispositions\').fadeOut(500);jQuery(\'#status_bar\').text(\'Disposition set to ' . $rowx['text'] . '\');jQuery(\'#status_bar\').fadeIn(2000);jQuery(\'#status_bar\').fadeOut(5000);">'; //box_start(135); //echo "<center>"; /*?> <img src = "images/database.png" > <?*/ echo ucfirst(strtolower($rowx['text'])); //box_end(); echo '</button>'; //echo "</td>"; if ($x > 5) { $x = 0; //echo "</tr>"; $closed = true; } //echo '</div></div>'; } if (!$closed) { //echo "</tr>"; } //echo "</table>"; } } else { box_start(); echo "You are not currently assigned to a job"; box_end(); } } }
} //echo "Success, wrote ($page) to file ($_GET[filename])"; fclose($handle); ?> <META HTTP-EQUIV=REFRESH CONTENT="0; URL=view_modules.php?action=install&filename=<?php echo $_GET[filename]; ?> "> <?php exit(0); } require "header.php"; box_start(); echo "<p><b>Install Modules</b></p>"; box_end(); box_start(); $url = "http://www.venturevoip.com/install_modules.php"; $f = 1; $c = 2; //1 for header, 2 for body, 3 for both $r = NULL; $a = NULL; $cf = NULL; $pd = NULL; $page = open_page($url, $f, $c, $r, $a, $cf, $pd); $page = split("\n", $page); //print_pre($page); for ($i = 0; $i < sizeof($page); $i++) { if (substr($page[$i], 0, 4) == "Name") { $name = substr($page[$i], 6); $icon = substr($page[$i + 1], 6);
public function box($content, $id = '') { return box_start($id) . $content . box_end(); }