mirror of
https://github.com/fspc/biketree.git
synced 2026-09-16 14:31:36 -04:00
First commit of biketree to github!
This commit is contained in:
Executable
+286
@@ -0,0 +1,286 @@
|
||||
<?php
|
||||
|
||||
include ("../settings.php");
|
||||
include ("../language/$cfg_language");
|
||||
include ("../classes/db_functions.php");
|
||||
include ("../classes/security_functions.php");
|
||||
include ("../classes/display.php");
|
||||
|
||||
$lang=new language();
|
||||
$dbf=new db_functions($cfg_server,$cfg_username,$cfg_password,$cfg_database,$cfg_tableprefix,$cfg_theme,$lang);
|
||||
$sec=new security_functions($dbf,'Sales Clerk',$lang);
|
||||
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
|
||||
|
||||
global $cfg_membershipID;
|
||||
|
||||
if(!$sec->isLoggedIn())
|
||||
{
|
||||
//header ("location: ../login.php");
|
||||
//exit();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../allstyles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<?php
|
||||
|
||||
include('odb.php');
|
||||
|
||||
|
||||
if (!mysql_connect($db_host, $db_user, $db_pwd))
|
||||
die("Can't connect to database");
|
||||
|
||||
if (!mysql_select_db($database))
|
||||
die("Can't select database");
|
||||
|
||||
|
||||
|
||||
// sending query
|
||||
if (isset($_GET[userID])){
|
||||
//echo "userID is $_GET[userID]";
|
||||
$result = mysql_query("SELECT * FROM customers WHERE id='$_GET[userID]'");
|
||||
if (!$result) {
|
||||
die(mysql_error());
|
||||
}
|
||||
$fields_num = mysql_num_fields($result);
|
||||
$field = mysql_fetch_array($result);
|
||||
|
||||
foreach($field as $key=>$value) { $$key = stripslashes($value); }
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Get expirey date
|
||||
// Construct a join query which already ADDS ONE YEAR to the date of purchase to result in expirey date
|
||||
$query22 = "SELECT sales.id, sales_items.sale_id, sales_items.item_id, DATE_ADD(sales.date, INTERVAL 1 YEAR) as expires ".
|
||||
"FROM sales, sales_items ".
|
||||
"WHERE sales.id = sales_items.sale_id AND sales_items.item_id = '1' AND sales.customer_id = '$_GET[userID]'";
|
||||
$result22 = mysql_query($query22) or die(mysql_error());
|
||||
|
||||
$today = date('Y-m-d');
|
||||
|
||||
// Print out the contents of each row into a table
|
||||
$row = mysql_fetch_array($result22);
|
||||
$expires = $row['expires'];
|
||||
// echo "EXPIRES $expires";
|
||||
if ($row['item_id'] == "1" && $expires > $today){
|
||||
$expiredate = $expires;
|
||||
} else {
|
||||
$expiredate = "Not Paid (or expired $expires) <br /> (USE SALES to sell a membership)";
|
||||
}
|
||||
|
||||
|
||||
//mysql_free_result($result);
|
||||
?>
|
||||
|
||||
<form name=booking enctype="multipart/form-data" method="POST" action="submit.php?userID=<? echo $id; ?>">
|
||||
<table class="text" width="*" border="0" bordercolor="#000000" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="middle" align="left" width="*" height="25">
|
||||
<h2>Add/Edit A Member</h2>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*" height="*">
|
||||
<h3>Personal Information</h3>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="text" width="*" border="0" bordercolor="#000000" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>First Name: </b> <input type="text" value="<? echo $first_name;?>" name="fname" size="10"><font color="red">*</font></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<b>Last Name: </b> <input type="text" name="lname" size="10" value="<? echo $last_name;?>"><font color="red">*</font>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>E-mail: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<input type="text" name="email" size="30" value="<? echo $email;?>"><font color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Mailing Lists: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<?
|
||||
if ($maillist1 == "1"){ $mail1check = "CHECKED"; }
|
||||
if ($maillist2 == "1"){ $mail2check = "CHECKED"; }
|
||||
if ($maillist3 == "1"){ $mail3check = "CHECKED"; }
|
||||
?>
|
||||
<input type="checkbox" name="maillist1" <? echo "CHECKED> $cfg_mailmanListName1"; ?>
|
||||
<input type="checkbox" name="maillist2" <? echo "$mail2check> $cfg_mailmanListName2"; ?>
|
||||
<input type="checkbox" name="maillist3" <? echo "$mail3check> $cfg_mailmanListName3"; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
if ($phone_nuber == ""){ $phone1 = "403-"; }
|
||||
?>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="middle" align="right" width="*"><b>Phone Number: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<input type="text" name="phone1" size="12" maxlength="13" value="<? echo $phone_number;?>">
|
||||
<font color="red">*</font>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Mailing Address: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<textarea name="address" rows="4" cols="30"><? echo $street_address; ?></textarea> <br />
|
||||
<font color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td align="right"><h3>Membership</h3>
|
||||
<tr><td align="left">
|
||||
<table class="text" width="*" border="0" bordercolor="#000000" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Student ID: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<input type="text" name="studentID" size="12" maxlength="13" value="<? echo $studentID;?>">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="middle" align="right" width="*"><b>OR: Drivers License #: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<input type="text" name="drivers" size="18" maxlength="13" value="<? echo $drivers;?>">(non-student)
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="middle" align="right" width="*"><b>OR: Cash Deposit: </b><br /><br /></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<input type="text" name="cashdeposit" size="12" maxlength="13" value="<? echo $cashdeposit;?>">(no drivers license)<br /><br />
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="middle" align="right" width="*">
|
||||
<?
|
||||
$$membertype = "SELECTED";
|
||||
?>
|
||||
<b>Member Type: </td><td> </b>
|
||||
<select name="membertype">
|
||||
<option value="0"> </option>
|
||||
<option value="0">---Good Life Types---</option>
|
||||
<option value="member" <? echo $member; ?>>Member</option>
|
||||
<option value="paidmechanic" <? echo $paidmechanic; ?>>Paid Mechanic</option>
|
||||
<option value="paidgreaser" <? echo $paidgreaser; ?>>Paid Greaser</option>
|
||||
<option value="volunteer" <? echo $volunteer; ?>>Volunteer</option>
|
||||
<option value="0"> </option>
|
||||
<option value="0">---Bike Root (U of C) Types---</option>
|
||||
<option value="uofcstudent" <? echo $uofcstudent; ?>>U of C Student</option>
|
||||
<option value="uofcstaff" <? echo $uofcstaff; ?>>U of C Staff</option>
|
||||
<option value="uofccommunity" <? echo $uofccommunity; ?>>Community Member</option>
|
||||
<option value="uofcvolunteer" <? echo $uofcvolunteer; ?>>Volunteer</option>
|
||||
<option value="uofcorganizer" <? echo $uofcorganizer; ?>>Organizer/Key Member</option>
|
||||
|
||||
</select>
|
||||
|
||||
<font color="red">*</font>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Liability Waiver Signed </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<?
|
||||
if ($waiver == "1"){ $waivercheck = "CHECKED"; }
|
||||
?>
|
||||
<input type="checkbox" name="waiver" <? echo $waivercheck; ?>>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b><? if(isset($_GET[userID])){ echo "Membership Expires:";} ?> </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<? if(isset($_GET[userID])){ echo $expiredate; } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Member Flags: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<?
|
||||
if ($warnedonce == "1"){ $warnedonce = "CHECKED"; }
|
||||
if ($warnedtwice == "1"){ $warnedtwice = "CHECKED"; }
|
||||
if ($banned == "1"){ $banned = "CHECKED"; }
|
||||
?>
|
||||
<input type="checkbox" name="warnedonce" <? echo "$warnedonce> First Warning"; ?><br />
|
||||
<input type="checkbox" name="warnedtwice" <? echo "$warnedtwice> Second Warning"; ?><br />
|
||||
<input type="checkbox" name="banned" <? echo "$banned> Banned from the shop"; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Notes About This Member: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<textarea name="notes" rows="4" cols="30"><? echo $comments; ?></textarea>
|
||||
<font color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</td></tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="center" width="*" height="*" style="border-bottom: 4px solid #333333; border-top: 1px dotted #333333">
|
||||
<input type="submit" name="submit" value="Submit">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<font size="2"><i>
|
||||
All information is held in confidence by TheBikeTree.<br>
|
||||
|
||||
Information will not be shared with any other organizations without your permission.</i></font><br><br>
|
||||
</form>
|
||||
|
||||
</center>
|
||||
</body>
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
<h3><br /> Membership List </h3>
|
||||
|
||||
<?php
|
||||
// sending query
|
||||
$result = mysql_query("SELECT userID,fname,lname,email FROM users ORDER BY lname ASC");
|
||||
if (!$result) {
|
||||
die("Query to show fields from table failed");
|
||||
}
|
||||
|
||||
$fields_num = mysql_num_fields($result);
|
||||
|
||||
//echo "<h1>Table: {$table}</h1>";
|
||||
echo "<table style=\"float: left;\" border=0 cellpadding=3 cellspacing=0><tr>";
|
||||
// printing table headers
|
||||
// echo "<td>First Name</td><td>Last Name</td><td>Edit User</td><td>More Info</td>";
|
||||
echo "</tr>\n";
|
||||
// printing table rows
|
||||
$colorbit = 1;
|
||||
while($row = mysql_fetch_array($result) )
|
||||
{
|
||||
|
||||
|
||||
if ($colorbit == 1){ echo "<tr style=\"background: #DDDDDD;\">";
|
||||
$idhide = "#CCCCCC";
|
||||
$colorbit = 2;
|
||||
} else {
|
||||
echo "<tr style=\"background: #BBBBBB;\">";
|
||||
$colorbit = 1;
|
||||
$idhide = "#999999";
|
||||
}
|
||||
|
||||
echo "<td>$row[lname], </td><td>$row[fname]</td>";
|
||||
echo "<td style=\"border-left: 1px solid #000000; padding-left: 6px; padding-right: 8px;\"> <a href=\"index.php?mode=users&action=add&userID=$row[userID]\">Edit Member</a></td><td style=\"border-left: 1px solid #000000;\"><a href=\"index.php?mode=users&action=getinfo&userID=$row[userID]\">More Info</a></td>";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
mysql_free_result($result);
|
||||
?>
|
||||
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
[05-Mar-2009 16:57:18] PHP Parse error: syntax error, unexpected $end in /home/recycle/public_html/WWW_campusbike.ca/pos/members/submit.php on line 175
|
||||
[05-Mar-2009 18:57:11] PHP Parse error: syntax error, unexpected '}' in /home/recycle/public_html/WWW_campusbike.ca/pos/classes/security_functions.php on line 238
|
||||
[05-Mar-2009 18:57:18] PHP Parse error: syntax error, unexpected '}' in /home/recycle/public_html/WWW_campusbike.ca/pos/classes/security_functions.php on line 240
|
||||
[06-Mar-2009 22:01:02] PHP Parse error: syntax error, unexpected ')' in /home/recycle/public_html/WWW_campusbike.ca/pos/members/submit.php on line 203
|
||||
[10-Mar-2017 00:41:22 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:42:24 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:43:53 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:43:58 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:43:58 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/odb.php on line 8
|
||||
[10-Mar-2017 00:43:58 America/Toronto] PHP Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in /home/variousa/public_html/pos/members/odb.php on line 8
|
||||
[10-Mar-2017 00:44:38 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:44:41 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:44:41 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/odb.php on line 8
|
||||
[10-Mar-2017 00:44:41 America/Toronto] PHP Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in /home/variousa/public_html/pos/members/odb.php on line 8
|
||||
[10-Mar-2017 00:46:49 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:46:49 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:46:49 America/Toronto] PHP Warning: mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:47:20 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:47:20 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:47:20 America/Toronto] PHP Warning: mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:49:14 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:49:19 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:51:15 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:51:17 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:51:17 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:51:17 America/Toronto] PHP Warning: mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:56:11 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:56:11 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:56:11 America/Toronto] PHP Warning: mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:56:16 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:56:16 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:56:16 America/Toronto] PHP Warning: mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:56:39 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:56:41 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:56:41 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:56:41 America/Toronto] PHP Warning: mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:57:48 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:57:50 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:57:50 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:57:50 America/Toronto] PHP Warning: mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:58:13 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:58:13 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:58:13 America/Toronto] PHP Warning: mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:59:19 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 00:59:19 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/odb.php on line 13
|
||||
[10-Mar-2017 00:59:19 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 00:59:56 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:00:02 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:00:34 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:00:34 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/odb.php on line 13
|
||||
[10-Mar-2017 01:00:34 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 01:00:40 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:03:22 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:04:06 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:04:45 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:05:38 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:05:45 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:05:51 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:05:51 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/odb.php on line 13
|
||||
[10-Mar-2017 01:05:51 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/members/add.php on line 35
|
||||
[10-Mar-2017 01:06:58 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:07:03 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
[10-Mar-2017 01:09:42 America/Toronto] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/variousa/public_html/pos/classes/db_functions.php on line 24
|
||||
Executable
+265
@@ -0,0 +1,265 @@
|
||||
<?php
|
||||
|
||||
include ("../settings.php");
|
||||
include ("../language/$cfg_language");
|
||||
include ("../classes/db_functions.php");
|
||||
include ("../classes/security_functions.php");
|
||||
include ("../classes/display.php");
|
||||
|
||||
$lang=new language();
|
||||
$dbf=new db_functions($cfg_server,$cfg_username,$cfg_password,$cfg_database,$cfg_tableprefix,$cfg_theme,$lang);
|
||||
$sec=new security_functions($dbf,'Sales Clerk',$lang);
|
||||
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
|
||||
|
||||
global $cfg_membershipID;
|
||||
|
||||
if(!$sec->isLoggedIn())
|
||||
{
|
||||
// header ("location: ../login.php");
|
||||
// exit();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../allstyles.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<center>
|
||||
<?php
|
||||
|
||||
// sending query
|
||||
if ($_GET[userID] != ""){
|
||||
// echo "userID is set";
|
||||
$result = mysql_query("SELECT * FROM customers WHERE id='$_GET[userID]'");
|
||||
if (!$result) {
|
||||
die("Query to show fields from table failed");
|
||||
}
|
||||
$fields_num = mysql_num_fields($result);
|
||||
$field = mysql_fetch_array($result);
|
||||
|
||||
foreach($field as $key=>$value) { $$key = stripslashes($value); }
|
||||
|
||||
}
|
||||
|
||||
// Get expirey date
|
||||
// Construct the bitchin join query
|
||||
$query22 = "SELECT sales.id, sales_items.sale_id, sales_items.item_id, DATE_ADD(sales.date, INTERVAL 1 YEAR) as expires ".
|
||||
"FROM sales, sales_items ".
|
||||
"WHERE sales.id = sales_items.sale_id AND sales_items.item_id = '1' AND sales.customer_id = '$_GET[userID]'";
|
||||
$result22 = mysql_query($query22) or die(mysql_error());
|
||||
|
||||
$today = date('Y-m-d');
|
||||
|
||||
// Print out the contents of each row into a table
|
||||
$row = mysql_fetch_array($result22);
|
||||
$expires = $row['expires'];
|
||||
// echo "EXPIRES $expires";
|
||||
if ($row['item_id'] == "1" && $expires > $today){
|
||||
$expiredate = $expires;
|
||||
} else {
|
||||
$expiredate = "Membership not paid (or expired $expires)";
|
||||
}
|
||||
|
||||
|
||||
|
||||
//mysql_free_result($result);
|
||||
?>
|
||||
|
||||
<form name=booking enctype="multipart/form-data" method="POST" action="add.php?userID=<? echo $_GET[userID]; ?>">
|
||||
<table class="text">
|
||||
<tr>
|
||||
<td class="40high">
|
||||
<h2 style="float: left;"> <? echo "$first_name $last_name"; ?></h2><input type="submit" name="edit" value="Edit Member" style="float: right;"><br />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*" height="*">
|
||||
<h3>Personal Information</h3>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="text">
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Member Number: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<? echo $id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>E-mail: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<? echo $email; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Email Lists: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<?
|
||||
if ($maillist1 == "1"){ $maillists = "$cfg_mailmanListName1"; }
|
||||
if ($maillist2 == "1"){ $maillists .= ", $cfg_mailmanListName2"; }
|
||||
if ($maillist3 == "1"){ $maillists .= ", $cfg_mailmanListName3"; }
|
||||
echo " $maillists";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Phone Number: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<? echo $phone_number;?>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Mailing Address: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<? echo $street_address; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td align="right"><h3>Membership</h3>
|
||||
<tr><td align="left">
|
||||
|
||||
<table class="text">
|
||||
<tr>
|
||||
|
||||
<td valign="middle" align="right" width="*">
|
||||
<b>Member Type: </td><td> </b> <? echo $membertype; ?>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Liability Waiver Signed? </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
<?
|
||||
if ($waiver == "1"){ $waivercheck = "Yes"; } else { $waivercheck = "No"; }
|
||||
?>
|
||||
<? echo $waivercheck; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Membership Expires: </b></td>
|
||||
<td valign="middle" align="left" width="* ">
|
||||
<? echo $expiredate; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td></tr>
|
||||
</td></tr>
|
||||
<tr><td align="right"><h3>Member Standing / Hours</h3>
|
||||
</td></tr>
|
||||
<tr><td align="left">
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="text">
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*" colspan=2><b>Member Flags: </b></td>
|
||||
<td valign="middle" align="left" width="*" colspan=3>
|
||||
<?
|
||||
if ($warnedonce == "1"){ $flags = "Warned Once"; }
|
||||
if ($warnedtwice == "1"){ $flags .= " - Warned Twice"; }
|
||||
if ($banned == "1"){ $flags .= " - Banned"; }
|
||||
echo " $flags";
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*" colspan=2><b>Notes About This Member: </b></td>
|
||||
<td valign="middle" align="left" width="*" colspan=3>
|
||||
<? echo $comments; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="left" width="*" colspan=5><br /><b>Record of Visits: </b></td></tr>
|
||||
|
||||
|
||||
<?
|
||||
$vquery = "SELECT *, DATE_FORMAT(endout,'%l:%i %p') as humanout, DATE_FORMAT(intime,'%b %e, %Y') as humanindate, DATE_FORMAT(intime,'%l:%i %p') as humanintime, UNIX_TIMESTAMP(intime) as unixin, UNIX_TIMESTAMP(endout) as unixout FROM visits WHERE userID=$id AND endout >= 1";
|
||||
$vresult = mysql_query($vquery);
|
||||
if (!$result) {
|
||||
die("Query to show visits from table failed");
|
||||
}
|
||||
$totalseconds=0;
|
||||
while($row = mysql_fetch_array($vresult)){
|
||||
echo "<tr>";
|
||||
echo "<td valign=\"middle\" align=\"left\" width=\"*\" style=\"border-right: 1px dotted #000000\">$row[humanindate]</td>
|
||||
<td style=\"border-right: 1px dotted #000000\">$row[humanintime] - $row[humanout]</td>
|
||||
<td style=\"border-right: 1px dotted #000000\" align=center>$row[activity]</td>
|
||||
<td>";
|
||||
|
||||
$timespent = $row[unixout] - $row[unixin];
|
||||
echo number_format(round($timespent / 3600*4)/4, 2) . " hrs";
|
||||
echo "</td>
|
||||
<td style=\"border-left: 1px dotted #000000\" align=center><a href=\"signin.php?visitID=$row[visitID]&userID=$id&activity=$row[activity]\">[Edit This Visit]</a></td>
|
||||
</tr>";
|
||||
$totalseconds = $totalseconds + $timespent;
|
||||
}
|
||||
|
||||
$hours=round($totalseconds/3600);
|
||||
echo "<tr><td colspan=1> </td><td colspan=2 align=\"right\"><br />Rounded Total:</td><td colspan=2 align=left><br /><b> $hours hours</b></td></tr>";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</td></tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="submit">
|
||||
<input type="submit" name="edit" value="Edit Member">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
</form>
|
||||
|
||||
</center>
|
||||
</body>
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
<?
|
||||
// OLD CODE DATABASE SHIT
|
||||
|
||||
include ("../settings.php");
|
||||
|
||||
$db_host = $cfg_server;
|
||||
$db_user = $cfg_username;
|
||||
$db_pwd = $cfg_password;
|
||||
$database = $cfg_database;
|
||||
|
||||
|
||||
|
||||
if (!mysql_connect($db_host, $db_user, $db_pwd))
|
||||
die("Can't connect to database");
|
||||
|
||||
if (!mysql_select_db($database))
|
||||
die("Can't select database");
|
||||
?>
|
||||
Executable
+290
@@ -0,0 +1,290 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../allstyles.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
include('odb.php');
|
||||
|
||||
if (!mysql_connect($db_host, $db_user, $db_pwd))
|
||||
die("Can't connect to database");
|
||||
|
||||
if (!mysql_select_db($database))
|
||||
die("Can't select database");
|
||||
|
||||
|
||||
|
||||
function getmonth($m=0) {
|
||||
return (($m==0 ) ? date("F") : date("F", mktime(0,0,0,$m)));
|
||||
}
|
||||
|
||||
//get prior signin time/date
|
||||
$intimeresult = mysql_query("SELECT DATE_FORMAT(intime, '%m') AS premonth, DATE_FORMAT(intime, '%d') AS preday, DATE_FORMAT(intime, '%Y') AS preyear, DATE_FORMAT(intime, '%H') AS prehour, DATE_FORMAT(intime, '%i') AS preminute FROM visits WHERE visitID='$_GET[visitID]'");
|
||||
|
||||
while($field = mysql_fetch_array($intimeresult)) {
|
||||
$premonth = $field[premonth]; $preday = $field[preday]; $preyear = $field[preyear];
|
||||
$prehour = $field[prehour]; $preminute = $field[preminute];
|
||||
}
|
||||
//get prior signOUT time/date
|
||||
$outtimeresult = mysql_query("SELECT activity, DATE_FORMAT(endout, '%m') AS premonth, DATE_FORMAT(endout, '%d') AS preday, DATE_FORMAT(endout, '%Y') AS preyear, DATE_FORMAT(endout, '%H') AS prehour, DATE_FORMAT(endout, '%i') AS preminute FROM visits WHERE visitID='$_GET[visitID]'");
|
||||
|
||||
while($field = mysql_fetch_array($outtimeresult)) {
|
||||
$premonthout = $field[premonth]; $predayout = $field[preday]; $preyearout = $field[preyear];
|
||||
$prehourout = $field[prehour]; $preminuteout = $field[preminute];
|
||||
$activity = $field[activity];
|
||||
}
|
||||
|
||||
// sending query
|
||||
$result = mysql_query("SELECT id,first_name,last_name FROM customers WHERE id='$_GET[userID]'");
|
||||
if (!$result) {
|
||||
die("Query to show fields from table failed");
|
||||
}
|
||||
$fields_num = mysql_num_fields($result);
|
||||
|
||||
while($field = mysql_fetch_array($result)) { $userID = $field[id]; $last_name = $field[last_name]; $first_name = $field[first_name]; }
|
||||
|
||||
?>
|
||||
|
||||
<form name=booking enctype="multipart/form-data" method="POST" action="signinsubmitretro.php">
|
||||
<table class="text">
|
||||
<tr>
|
||||
<td valign="middle" class=high40>
|
||||
<h2>Sign in/out retroactively</h2>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*" height="*">
|
||||
<h3>Time/Date IN</h3>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="text" width="*" border="0" bordercolor="#000000" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Name: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
|
||||
<? echo "<em><b>$first_name $last_name</b></em>";?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Date: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
|
||||
<select name="month">
|
||||
<?
|
||||
$month = 1;
|
||||
while( $month < 13 ) {
|
||||
$monthname = getmonth($month);
|
||||
if ($month == $premonth){ $thismonth = "SELECTED"; } else { $thismonth = "";}
|
||||
echo "<option value=\"$month\" $thismonth>$monthname</option> ";
|
||||
$month ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<select name="day">
|
||||
<?
|
||||
$day = 1;
|
||||
while( $day < 32 ) {
|
||||
if ($day == $preday){ $thisday = "SELECTED"; } else { $thisday = "";}
|
||||
echo "<option value=\"$day\" $thisday>$day</option> ";
|
||||
$day ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<select name="year">
|
||||
<?
|
||||
$year = date("Y")-1;
|
||||
$fun = $year;
|
||||
while( $year < $fun+5 ) {
|
||||
if ($year == $preyear){ $thisyear = "SELECTED"; } else { $thisyear = "";}
|
||||
echo "<option value=\"$year\" $thisyear>$year</option> ";
|
||||
$year ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Time: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
|
||||
|
||||
<select name="hour">
|
||||
<?
|
||||
$hour = 0;
|
||||
while( $hour < 24 ) {
|
||||
if($hour<10) { $hour = "0$hour"; } else { $hour = "$hour"; }
|
||||
if ($hour == $prehour){ $thishour = "SELECTED"; } else { $thishour = "";}
|
||||
echo "<option value=\"$hour\" $thishour>$hour</option> ";
|
||||
$hour ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
:
|
||||
<select name="minute">
|
||||
<?
|
||||
$minute = 00;
|
||||
while( $minute < 60 ) {
|
||||
if($minute<10) { $minute = "0$minute"; } else { $minute = "$minute"; }
|
||||
if ($minute == $preminute){ $thisminute = "SELECTED"; } else { $thisminute = "";}
|
||||
echo "<option value=\"$minute\" $thisminute>$minute</option> ";
|
||||
$minute ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
(24 hour time)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr><td valign="middle" align="right" width="*"><b> </b></td><td valign="middle" align="left" width="*"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Activity: </b><br /><br /></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
|
||||
<? //If it's not from the main page, grab it from the visits table
|
||||
if(isset($_GET[activity])){
|
||||
$$_GET[activity] = "SELECTED";
|
||||
} else {
|
||||
$$activity = "SELECTED";
|
||||
}
|
||||
?>
|
||||
<select name="activity">
|
||||
<option value="using" <? echo $using; ?>>Using the Shop</option>
|
||||
<option value="volunteering" <? echo $volunteering; ?>>Volunteering for the shop</option>
|
||||
<option value="Working" <? echo $Working; ?>>Mechanic/Admin</option>
|
||||
<option value="dogfucking" <? echo $dogfucking; ?>>Fucking the dog and drinking our beer</option>
|
||||
</select>
|
||||
<br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*" height="*">
|
||||
<h3>Time/Date OUT</h3>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<table class="text" width="*" border="0" bordercolor="#000000" cellpadding="0" cellspacing="0">
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Date: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
|
||||
<select name="monthout">
|
||||
<?
|
||||
$month = 1;
|
||||
while( $month < 13 ) {
|
||||
$monthname = getmonth($month);
|
||||
if ($month == $premonthout){ $thismonth = "SELECTED"; } else { $thismonth = "";}
|
||||
echo "<option value=\"$month\" $thismonth>$monthname</option> ";
|
||||
$month ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<select name="dayout">
|
||||
<?
|
||||
$day = 1;
|
||||
while( $day < 32 ) {
|
||||
if ($day == $predayout){ $thisday = "SELECTED"; } else { $thisday = "";}
|
||||
echo "<option value=\"$day\" $thisday>$day</option> ";
|
||||
$day ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<select name="yearout">
|
||||
<?
|
||||
$year = date("Y")-1;
|
||||
$fun = $year;
|
||||
while( $year < $fun+5 ) {
|
||||
if ($year == $preyearout){ $thisyear = "SELECTED"; } else { $thisyear = "";}
|
||||
echo "<option value=\"$year\" $thisyear>$year</option> ";
|
||||
$year ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="right" width="*"><b>Time: </b></td>
|
||||
<td valign="middle" align="left" width="*">
|
||||
|
||||
|
||||
<select name="hourout">
|
||||
<?
|
||||
$hour = 0;
|
||||
while( $hour < 24 ) {
|
||||
if($hour<10) { $hour = "0$hour"; } else { $hour = "$hour"; }
|
||||
if ($hour == $prehourout){ $thishour = "SELECTED"; } else { $thishour = "";}
|
||||
echo "<option value=\"$hour\" $thishour>$hour</option> ";
|
||||
$hour ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
:
|
||||
<select name="minuteout">
|
||||
<?
|
||||
$minute = 00;
|
||||
while( $minute < 60 ) {
|
||||
if($minute<10) { $minute = "0$minute"; } else { $minute = "$minute"; }
|
||||
if ($minute == $preminuteout){ $thisminute = "SELECTED"; } else { $thisminute = "";}
|
||||
echo "<option value=\"$minute\" $thisminute>$minute</option> ";
|
||||
$minute ++;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
(24 hour time)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr><td valign="middle" align="right" width="*"><b> </b></td><td valign="middle" align="left" width="*"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<td valign="middle" align="center" width="*" height="*" style="border-bottom: 4px solid #333333; border-top: 1px dotted #333333">
|
||||
<?
|
||||
if ($_GET[refer] == "membersin"){
|
||||
echo "<input type=\"checkbox\" name=\"ignoreout\" id=\"ignorer\" CHECKED /> <label for=\"willcall\"><em>Check here to stay signed in (ignore signout time).</em></label><br />";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="visitID" value="<? echo "$_GET[visitID]"; ?>" >
|
||||
<input type="hidden" name="userID" value="<? echo "$userID"; ?>" >
|
||||
<input type="submit" name="submit" value="Update" >
|
||||
<!--- <input type="submit" name="submit" value="Sign OUT"> --->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
</table>
|
||||
<br><br>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
include ("../settings.php");
|
||||
include ("../language/$cfg_language");
|
||||
include ("../classes/db_functions.php");
|
||||
include ("../classes/security_functions.php");
|
||||
include ("../classes/display.php");
|
||||
|
||||
$lang=new language();
|
||||
$dbf=new db_functions($cfg_server,$cfg_username,$cfg_password,$cfg_database,$cfg_tableprefix,$cfg_theme,$lang);
|
||||
$sec=new security_functions($dbf,'Sales Clerk',$lang);
|
||||
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
|
||||
|
||||
global $cfg_membershipID;
|
||||
|
||||
if(!$sec->isLoggedIn())
|
||||
{
|
||||
// header ("location: ../login.php");
|
||||
// exit();
|
||||
}
|
||||
|
||||
|
||||
//include('odb.php');
|
||||
|
||||
|
||||
function getmonth($m=0) {
|
||||
return (($m==0 ) ? date("F") : date("F", mktime(0,0,0,$m)));
|
||||
}
|
||||
|
||||
$month = getmonth($_POST[month]);
|
||||
|
||||
|
||||
|
||||
// MAKE SURE THEY'RE NOT ALREADY HERE!
|
||||
|
||||
|
||||
//$in = mktime($_POST[hour], $_POST[minute], 0, $_POST[month], $_POST[day], $_POST[year]);
|
||||
//$tdin = date('Y-m-d H:i:s');
|
||||
//$activity = $_POST[activity];
|
||||
$sec->signinMember($_POST[userID], mktime($_POST[hour], $_POST[minute], 0, $_POST[month], $_POST[day], $_POST[year]), $_POST[activity]);
|
||||
/*$isinresult = mysql_query("SELECT userID FROM visits WHERE endout IS NULL");
|
||||
|
||||
if (!$isinresult) { die("Query to show fields from table failed"); }
|
||||
|
||||
while ($isinrow = mysql_fetch_array($isinresult)) {
|
||||
if ($_POST[userID] == "$isinrow[userID]"){ die("<b>Bike Error!! User is already signed in...</b>"); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// MAKE SURE THEY'VE PAID THEIR MEMBERSHIP (IF REQUIRED BY CONFIG FILE)
|
||||
if(!$sec->checkMembership($_POST[userID]) && $cfg_reqmembership == 1){ echo "Membership not paid (or expired $expires)!<br /><a href=\"../home.php\">Go Home --></a>"; die(''); }
|
||||
|
||||
// Have you been a naughty schoolchild and not signed your waiver? PUNISH!
|
||||
if(!$sec->checkWaiver($_POST[userID])){ echo "Waiver not signed. Sign waiver, or no shop access you naughty boy!<br /><a href=\"../home.php\">Go Home --></a>"; die(''); }
|
||||
|
||||
|
||||
|
||||
// ADD IT TO THE VISITS DATABASE
|
||||
|
||||
$in = mktime($_POST[hour], $_POST[minute], 0, $_POST[month], $_POST[day], $_POST[year]);
|
||||
$tdin = date('Y-m-d H:i:s');
|
||||
$activity = $_POST[activity];
|
||||
|
||||
if (isset($_POST[userID])){
|
||||
$query = "INSERT INTO `visits` (`userID` ,`intime` ,`activity`) VALUES ('$_POST[userID]', '$tdin', '$activity')";
|
||||
// echo "IT FJDSFDSA $query";
|
||||
mysql_query($query);
|
||||
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
// sending query
|
||||
if ($_POST[userID] != ""){
|
||||
// echo "userID is set: $_POST[userID]";
|
||||
$result = mysql_query("SELECT * FROM customers WHERE id='$_POST[userID]'");
|
||||
if (!$result) {
|
||||
die("Query to show fields from table failed");
|
||||
}
|
||||
$fields_num = mysql_num_fields($result);
|
||||
$field = mysql_fetch_array($result);
|
||||
|
||||
foreach($field as $key=>$value) { $$key = stripslashes($value); }
|
||||
|
||||
}
|
||||
|
||||
header( 'Location: /pos/home.php' ) ;
|
||||
|
||||
?>
|
||||
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../allstyles.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include ("../settings.php");
|
||||
include ("../language/$cfg_language");
|
||||
include ("../classes/db_functions.php");
|
||||
include ("../classes/security_functions.php");
|
||||
include ("../classes/display.php");
|
||||
|
||||
$lang=new language();
|
||||
$dbf=new db_functions($cfg_server,$cfg_username,$cfg_password,$cfg_database,$cfg_tableprefix,$cfg_theme,$lang);
|
||||
$sec=new security_functions($dbf,'Sales Clerk',$lang);
|
||||
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
|
||||
|
||||
global $cfg_membershipID;
|
||||
|
||||
if(!$sec->isLoggedIn())
|
||||
{
|
||||
// header ("location: ../login.php");
|
||||
// exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getmonth($m=0) {
|
||||
return (($m==0 ) ? date("F") : date("F", mktime(0,0,0,$m)));
|
||||
}
|
||||
$month = getmonth($_POST[month]);
|
||||
|
||||
// STICKUPDATE IT TO THE VISITS DATABASE
|
||||
|
||||
$in = mktime($_POST[hour], $_POST[minute], 0, $_POST[month], $_POST[day], $_POST[year]);
|
||||
$out = mktime($_POST[hourout], $_POST[minuteout], 0, $_POST[monthout], $_POST[dayout], $_POST[yearout]);
|
||||
$tdin = date('Y-m-d H:i:s', $in);
|
||||
if($_POST[ignoreout] != "on"){ $tdout = date('Y-m-d H:i:s', $out); $outquery = "endout='$tdout',"; }
|
||||
$activity = $_POST[activity];
|
||||
|
||||
if (isset($_POST[userID])){
|
||||
$query = "UPDATE visits SET intime='$tdin', $outquery activity='$activity' WHERE visitID=$_POST[visitID]";
|
||||
|
||||
//REPORT BACK TO USER THAT ALL IS OK!
|
||||
echo "<table class=text><tr><td class=\"high40\"><h2>Sign in/out retroactively</h2></td></tr><tr><td><h3>Success</h3><br /><center>It has been made so. </td></tr><tr><td class=\"submit\"><br /><a href=\"../home.php\">Continue</a><br /></center></td></tr></table>";
|
||||
mysql_query($query);
|
||||
echo mysql_error();
|
||||
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
include ("../settings.php");
|
||||
include ("../language/$cfg_language");
|
||||
include ("../classes/db_functions.php");
|
||||
include ("../classes/security_functions.php");
|
||||
|
||||
function getmonth($m=0) {
|
||||
return (($m==0 ) ? date("F") : date("F", mktime(0,0,0,$m)));
|
||||
}
|
||||
|
||||
|
||||
// MAKE IT SO IN THE USER DATABASE
|
||||
$dbf=new db_functions($cfg_server,$cfg_username,$cfg_password,$cfg_database,$cfg_tableprefix,$cfg_theme,$lang);
|
||||
|
||||
if(isset($_GET[visitID])){
|
||||
$visitID = $_GET[visitID];
|
||||
$isAdmin = false;
|
||||
//echo "javascript:alert(\"$visitID\")";
|
||||
if($visitID < 1){
|
||||
$result = mysql_fetch_array(mysql_query("SELECT visitID FROM visits WHERE endout IS NULL AND activity = \"Administrator\""));
|
||||
$visitID = $result[visitID];
|
||||
//echo "javascript:alert(\"$visitID\");";
|
||||
$isAdmin = true;
|
||||
}
|
||||
|
||||
//MAKE THE TIME!
|
||||
$now = date('Y-m-d H:i:s');
|
||||
$query="UPDATE visits SET endout='$now' WHERE visitID='$visitID' LIMIT 1";
|
||||
|
||||
mysql_query($query) or die('Error, user not done . Consult Mark, he probably fucked up. OH shits');
|
||||
}
|
||||
|
||||
if(isset($_GET[switchID])){
|
||||
$tablename="$cfg_tableprefix".'visits';
|
||||
$tdin = date('Y-m-d H:i:s');
|
||||
$field_names=array('userID','intime','activity');
|
||||
//$adminID = $dbf->idToField($cfg_tableprefix.'users','customerID',$_SESSION['session_user_id']);
|
||||
$field_data=array("$_GET[switchID]", "$tdin", "Mechanic");
|
||||
$dbf->insert($field_names, $field_data, $tablename, "");
|
||||
}
|
||||
|
||||
if($isAdmin){
|
||||
header('Location: /pos/login.php');
|
||||
}else{
|
||||
header('Location: /pos/home.php');
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Executable
+220
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
|
||||
include ("../settings.php");
|
||||
include ("../language/$cfg_language");
|
||||
include ("../classes/db_functions.php");
|
||||
include ("../classes/security_functions.php");
|
||||
include ("../classes/display.php");
|
||||
|
||||
$lang=new language();
|
||||
$dbf=new db_functions($cfg_server,$cfg_username,$cfg_password,$cfg_database,$cfg_tableprefix,$cfg_theme,$lang);
|
||||
$sec=new security_functions($dbf,'Sales Clerk',$lang);
|
||||
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
|
||||
|
||||
global $cfg_membershipID;
|
||||
|
||||
if(!$sec->isLoggedIn())
|
||||
{
|
||||
// header ("location: ../login.php");
|
||||
// exit();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h3> Progress </h3>
|
||||
<b>...If membership needs to be sold, click <a href="../sales/sale_ui.php">HERE</a></b><br /><br />
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
/*
|
||||
if (!mysql_connect($db_host, $db_user, $db_pwd))
|
||||
die("Can't connect to database");
|
||||
|
||||
if (!mysql_select_db($database))
|
||||
die("Can't select database");
|
||||
*/
|
||||
|
||||
/**
|
||||
Validate an email address.
|
||||
Provide email address (raw input)
|
||||
Returns true if the email address has the email
|
||||
address format and the domain exists.
|
||||
*/
|
||||
function validEmail($email)
|
||||
{
|
||||
$isValid = true;
|
||||
$atIndex = strrpos($email, "@");
|
||||
if (is_bool($atIndex) && !$atIndex)
|
||||
{
|
||||
$isValid = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$domain = substr($email, $atIndex+1);
|
||||
$local = substr($email, 0, $atIndex);
|
||||
$localLen = strlen($local);
|
||||
$domainLen = strlen($domain);
|
||||
if ($localLen < 1 || $localLen > 64)
|
||||
{
|
||||
// local part length exceeded
|
||||
$isValid = false;
|
||||
}
|
||||
else if ($domainLen < 1 || $domainLen > 255)
|
||||
{
|
||||
// domain part length exceeded
|
||||
$isValid = false;
|
||||
}
|
||||
else if ($local[0] == '.' || $local[$localLen-1] == '.')
|
||||
{
|
||||
// local part starts or ends with '.'
|
||||
$isValid = false;
|
||||
}
|
||||
else if (preg_match('/\\.\\./', $local))
|
||||
{
|
||||
// local part has two consecutive dots
|
||||
$isValid = false;
|
||||
}
|
||||
else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain))
|
||||
{
|
||||
// character not valid in domain part
|
||||
$isValid = false;
|
||||
}
|
||||
else if (preg_match('/\\.\\./', $domain))
|
||||
{
|
||||
// domain part has two consecutive dots
|
||||
$isValid = false;
|
||||
}
|
||||
else if
|
||||
(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',
|
||||
str_replace("\\\\","",$local)))
|
||||
{
|
||||
// character not valid in local part unless
|
||||
// local part is quoted
|
||||
if (!preg_match('/^"(\\\\"|[^"])+"$/',
|
||||
str_replace("\\\\","",$local)))
|
||||
{
|
||||
$isValid = false;
|
||||
}
|
||||
}
|
||||
if ($isValid && !(checkdnsrr($domain,"MX") || checkdnsrr($domain,"A")))
|
||||
{
|
||||
// domain not found in DNS
|
||||
$isValid = false;
|
||||
}
|
||||
}
|
||||
return $isValid;
|
||||
}
|
||||
|
||||
|
||||
// sending query
|
||||
|
||||
//echo "userID is not set";
|
||||
|
||||
|
||||
$fname = $_POST[fname];
|
||||
$lname = $_POST[lname];
|
||||
|
||||
$maillist = $_POST[maillist];
|
||||
|
||||
|
||||
//if (!preg_match('/^(\(?[2-9]{1}[0-9]{2}\)?|[0-9]{3,3}[-. ]?)[ ][0-9]{3,3}[-. ]?[0-9]{4,4}$/', $_POST[phone1])) {
|
||||
//die('Phone number invalid. Click back and try again.');
|
||||
//}
|
||||
|
||||
if ($_POST[waiver] == "on"){ $waiver = "1"; } else { $waiver = "0";}
|
||||
if ($_POST[maillist1] == "on"){ $maillist1 = "1"; } else { $maillist1 = "0";}
|
||||
if ($_POST[maillist2] == "on"){ $maillist2 = "1"; } else { $maillist2 = "0";}
|
||||
if ($_POST[maillist3] == "on"){ $maillist3 = "1"; } else { $maillist3 = "0";}
|
||||
if ($_POST[warnedonce] == "on"){ $warnedonce = "1"; } else { $warnedonce = "0";}
|
||||
if ($_POST[warnedtwice] == "on"){ $warnedtwice = "1"; } else { $warnedtwice = "0";}
|
||||
if ($_POST[banned] == "on"){ $banned = "1"; } else { $banned = "0";}
|
||||
|
||||
$phone1 = $_POST[phone1];
|
||||
|
||||
$email = $_POST[email];
|
||||
// $pass = validEmail($email);
|
||||
// if ($pass) { $email = $email; } else { die('E-mail Address is not valid. Click back and try again.'); }
|
||||
$email = $email;
|
||||
$address = $_POST[address];
|
||||
$membertype = $_POST[membertype];
|
||||
$notes = $_POST[notes];
|
||||
|
||||
|
||||
if (!isset($_GET[userID]) || $_GET[userID] == ""){
|
||||
$query = "INSERT INTO customers (first_name, last_name, phone_number, email, maillist1, maillist2, maillist3, street_address, membertype, studentID, drivers, cashdeposit, waiver, warnedonce, warnedtwice, banned, comments) VALUES ('$fname', '$lname', '$phone1', '$email', '$maillist1', '$maillist2', '$maillist3', '$address', '$membertype', '$_POST[studentID]', '$_POST[drivers]','$_POST[cashdeposit]', '$waiver', '$warnedonce', '$warnedtwice', '$banned', '$notes')";
|
||||
|
||||
// echo "QUEERY:$query";
|
||||
|
||||
mysql_query($query) or die('Error, user not added. Consult Mark...');
|
||||
|
||||
echo "<b>...User has been added</b><br /><br />";
|
||||
|
||||
//$query = "FLUSH PRIVILEGES";
|
||||
//mysql_query($query) or die('Error, flush insert query failed');
|
||||
|
||||
// echo "<b>Here is some technical jargon if you want to check what info was added</b>... <br />$query";
|
||||
/*
|
||||
//EMAIL WELCOME TO MEMBER!
|
||||
|
||||
$headers = 'MIME-Version: 1.0' . "\r\n";
|
||||
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
|
||||
$headers .= 'From: reciepts@goodlifebikes.ca' . "\r\n";
|
||||
$headers .= 'Reply-to: info@goodlifebikes.ca' . "\r\n";
|
||||
|
||||
$message = "<html><body><br /><br /><b>Please retain or print this receipt for your records</b><br /> $body </body></html>";
|
||||
|
||||
// In case any of our lines are larger than 70 characters, we should use wordwrap()
|
||||
$message = wordwrap($message, 70);
|
||||
|
||||
// Send
|
||||
mail($customer_email, "Your E-receipt from $cfg_company", $message, $headers);
|
||||
|
||||
echo "<h3>E-Reciept has been sent to <$customer_email></h3>";
|
||||
|
||||
*/
|
||||
|
||||
|
||||
} else {
|
||||
$query="UPDATE customers SET first_name='$fname', last_name='$lname', phone_number='$phone1', email='$email', maillist1='$maillist1', maillist2='$maillist2', maillist3='$maillist3', street_address='$address', membertype='$membertype', studentID='$_POST[studentID]', drivers='$_POST[drivers]', cashdeposit='$_POST[cashdeposit]', waiver='$waiver', comments='$notes', warnedonce='$warnedonce', warnedtwice='$warnedtwice', banned='$banned' WHERE id=$_GET[userID] ";
|
||||
|
||||
// echo "QUERY : $query";
|
||||
|
||||
mysql_query($query) or die('Error, user not added. Consult Mark...');
|
||||
|
||||
echo "<b>...User $fname $lname has been updated</b>(if no errors appear above)<br /><br />";
|
||||
|
||||
|
||||
|
||||
//$query = "FLUSH PRIVILEGES";
|
||||
//mysql_query($query) or die('Error, flush insert query failed');
|
||||
|
||||
// echo "<b>Here is some technical jargon if you want to check what info was added</b>... <br />$query";
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!isset($_GET[userID]) || $_GET[userID] == ""){
|
||||
|
||||
echo "<b>...register mailing list subscriptions</b>";
|
||||
if($maillist1 == 1){$subscribeURL = "http://$cfg_mailmanLocation/mailman/admin/$cfg_mailmanListName1" . "_" . "$cfg_mailmanLocation/members/add?subscribees=$email&adminpw=$cfg_mailmanPass&send_welcome_msg_to_this_batch=0&send_notifications_to_list_owner=0";
|
||||
echo "<iframe scrolling=no src=\"$subscribeURL\" style=\"display: block;\" width=\"500\" height=\"80\"><p>Your browser does not support iframes.</p></iframe>";
|
||||
}
|
||||
if($maillist2 == 1){$subscribeURL = "http://$cfg_mailmanLocation/mailman/admin/$cfg_mailmanListName2" . "_" . "$cfg_mailmanLocation/members/add?subscribees=$email&adminpw=$cfg_mailmanPass&send_welcome_msg_to_this_batch=0&send_notifications_to_list_owner=0";
|
||||
echo "<iframe scrolling=no src=\"$subscribeURL\" style=\"display: block;\" width=\"500\" height=\"80\"><p>Your browser does not support iframes.</p></iframe>";
|
||||
}
|
||||
if($maillist3 == 1){$subscribeURL = "http://$cfg_mailmanLocation/mailman/admin/$cfg_mailmanListName3" . "_" . "$cfg_mailmanLocation/members/add?subscribees=$email&adminpw=$cfg_mailmanPass&send_welcome_msg_to_this_batch=0&send_notifications_to_list_owner=0";
|
||||
echo "<iframe scrolling=no src=\"$subscribeURL\" style=\"display: block;\" width=\"500\" height=\"80\"><p>Your browser does not support iframes.</p></iframe>";
|
||||
}
|
||||
|
||||
}
|
||||
echo "<br />...NOTE: If you are not connected to the internet, the user has NOT been added to the mailing lists.";
|
||||
echo "<br /><br />Finished<br /><br />"
|
||||
?>
|
||||
<a href="../customers/manage_customers.php">Back to Member List...</a>
|
||||
<body>
|
||||
Reference in New Issue
Block a user