Example #1
0
function memberID($member_number)
{
    //    new memberID function now searches for staff (staff != 0) and for sister orgs. (memType = 6)
    //    to allow cashier to select which personNum to apply to current transaction.
    //     Else function defaults to personNum 1.                                        ~jb    2007-07-22
    $query = "select * from custdata where CardNo = '" . $member_number . "'";
    $db = pDataConnect();
    $result = sql_query($query, $db);
    $num_rows = sql_num_rows($result);
    if ($num_rows == 1) {
        $row = sql_fetch_array($result);
        $_SESSION["memID"] = $row["id"];
        setMember($_SESSION["memID"]);
        lastpage();
    } elseif ($num_rows > 1) {
        while ($row = mysql_fetch_assoc($result)) {
            $_SESSION["memID"] = $row["id"];
            if ($row["staff"] != 0 || $row["memType"] == 6) {
                $_SESSION["idSearch"] = $member_number;
                maindisplay("memlist.php");
            } else {
                setMember($_SESSION["memID"]);
                break;
            }
        }
        lastpage();
    } else {
        $_SESSION["memberID"] = "0";
        $_SESSION["memType"] = 0;
        $_SESSION["percentDiscount"] = 0;
        $_SESSION["memMsg"] = "";
        maindisplay("memsearch.php");
    }
    mysql_free_result($result);
}
Example #2
0
            }
            echo "<option value='" . $row["CardNo"] . "::" . $row["personNum"] . "::" . $row["id"] . "' " . $selected . " />" . $row["CardNo"] . " " . $row["LastName"] . ", " . $row["FirstName"] . "\n";
        }
        ?>
                        </select>
                    </form>
                </td>
                <td height='295' width='40'></td>
                <td height='295' valign='center'>
                    <font face='arial' size='+1' color='#004080'>use arrow keys to navigate<p>[esc] to cancel</p></font>
                </tr>
            </tr>
        </table>
        <?php 
    } else {
        $row = sql_fetch_array($result);
        setMember($row["id"]);
        gohome();
    }
}
if ($away == 1) {
    $away = 0;
    printfooterb();
} else {
    printfooter();
}
?>
    </body>
</html>

Example #3
0
if (!$entered || strlen($entered) < 1) {
    gohome();
}
if (!is_numeric($entered) || strpbrk($entered, ".") == true) {
    echo "<body onLoad='document.forms[0].elements[0].focus();'>\n";
    printheaderb();
    loanenter("Invalid entry<br />Try again (hint: 15000 = \$150)");
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
    </head>
    <body onload="window.top.input.location = 'input.php'; document.form.submit();" >
        <?php 
    $_SESSION["loanTime"] = 'time(Y-m-d H:i:s)';
    $db = pDataConnect();
    $query = "SELECT id FROM custdata WHERE CardNo = 99999";
    $result = sql_query($query, $db);
    $nonmemID = mysql_result($result, 0);
    setMember($nonmemID);
    ttl();
    echo "<form name='form' method='post' autocomplete='off' action='pos2.php'>";
    echo "<input name='input' type='hidden' value='" . $entered . "LN'>";
    echo "</form>";
    echo "</body></html>";
}
$_SESSION["scan"] = "noScan";
$_SESSION["beep"] = "noBeep";
printfooter();
Example #4
0
    (at your option) any later version.

    IS4C is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    in the file license.txt along with IS4C; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*********************************************************************************/
// session_start();
if (!function_exists("setMember")) {
    include "prehkeys.php";
}
if (!function_exists("gohome")) {
    include "maindisplay.php";
}
$_SESSION["repeat"] = 0;
if (isset($_POST["selectlist"])) {
    $member_number = trim($_POST["selectlist"]);
} else {
    $member_number = "";
}
$mem_info = explode("::", $member_number);
if ($mem_info[0] && strlen($mem_info[0]) >= 1) {
    //	setMember($mem_info[0], $mem_info[1]);
    setMember($mem_info[2]);
}
gohome();