示例#1
0
<?php

// this file works with amalist
require "globals.php5";
require "cookies.php5";
$mesg = '';
if ($UUID && $ACCESS == 500) {
    try {
        $resdb = db_amalist();
        $res = $resdb->query('select count(*) from amalist where accept = 0 and reject = 0');
        if ($res) {
            list($totalnum) = $res->fetch_row();
            $res->free();
        }
        $strippost = str_replace('"', "'", $_POST);
        // make all double quotes to be single
        extract($strippost, EXTR_SKIP);
        if (isset($submit1) && $ACCESS >= 50) {
            // 1st form
            // nfrom, nto, nlist1, sort1
            if (empty($nlist1)) {
                $nlist1 = "new-{$nfrom}-{$nto}";
            }
            $sort = 'doc_id';
            $vs = 'ID#';
            if ($sort1 == 2) {
                $sort = 'lname,fname';
                $vs = 'Last and First name';
            } elseif ($sort1 == 3) {
                $sort = 'spec';
                $vs = 'Specialty';
示例#2
0
         list($preved) = $result->fetch_row();
         $result->fetch_row();
         // skip current
         list($nextid) = $result->fetch_row();
     } else {
         $sql = "select memberuid from custlists where owneruid = {$peekuid} and listid = {$lid} LIMIT 0, 2";
         $result = $db->query($sql);
         $result->fetch_row();
         // skip current
         list($nextid) = $result->fetch_row();
     }
     $result->free();
     //$db->close(); no more
 }
 // got $preved and $nextid
 $ama = db_amalist();
 $doc = new AMAres($ama, $docid);
 if ($doc->uid_mod) {
     $result = $db->query("select username from operators where uid = {$doc->uid_mod}");
     list($usermod) = $result->fetch_row();
     $result->free();
 }
 // now process form buttons
 if (!$doc->accept && !$doc->reject) {
     // normal case
     if (isset($_POST['submit'])) {
         // fname midname lname addr1 addr2 city state zip phone spec
         $strippost = str_replace('"', "'", $_POST);
         // make all double quotes to be single
         $fname = $strippost['fname'];
         $midname = $strippost['midname'];