1000){ // $uid < 0 is a Y_prospect // $uid > 1000 is a Y_customer echo '

Account | '; if($uid > 1000){ echo ' Inventory | '; echo ' Edit Account | '; echo ' Change Password | '; // echo ' History | '; }elseif($uid < 0){ echo ' Edit Account | '; } echo ' Subscriptions | '; echo ' Log Out

'; echo '

 

'; if($uid < 0){ if($s=="editprospectaccount"){ $error = checkprospectdetails($Eemail, $Ecompany, $Efirstname, $Elastname, $Ecity, $Ephone, "edit", $Epassword1, $Epassword2); if($error){ echo "". $error . ""; $s = "editaccount"; }else{ // All good. Save the details $prospectid = $uid * -1; $query = " UPDATE Y_prospects SET company = '$Ecompany', email = '$Eemail', "; if($Epassword1){ $query .= " password = '$Epassword1', "; } $query .= " firstname = '$Efirstname', lastname = '$Elastname', city = '$Ecity', country = '$Ecountry', phone = '$Ephone' WHERE id = '$prospectid' "; // Save the uodated prospect details $update = mysql_query($query); $s = ""; ?>
Log In Email:
First Name:
Last Name:
Company:
Phone:
City:
Country: '; echo''; echo'
Change Password: Again:
 
'; } if(!$s){ echo '

Welcome '.$uname.'.

'; echo'
Log In Email: '.$uemail.'
First Name: '.$ufirstname.'
Last Name: '.$ulastname.'
Company: '.$ucompany.'
Phone: '.$uphone.'
City: '.$ucity.'
Country: '.$ucountry.'
'; } } if($uid > 1000){ //// This is a customer. Show the customer record // Contact detail // Inventory // Upgrades, Maintenance if($s == "savecustomer"){ $query = "UPDATE Y_customers SET "; $query .= "company = '$company', "; $query .= "contact = '$contact', "; $query .= "email = '$email', "; $query .= "phone = '$phone', "; $query .= "country = '$country', "; $query .= "paycompany = '$paycompany', "; $query .= "paycontact = '$paycontact', "; $query .= "payemail = '$payemail', "; $query .= "payphone = '$payphone', "; $query .= "payaddress1 = '$payaddress1', "; $query .= "payaddress2 = '$payaddress2', "; $query .= "paycity = '$paycity', "; $query .= "paystate = '$paystate', "; $query .= "payzip = '$payzip', "; $query .= "shipcompany = '$shipcompany', "; $query .= "shipcontact = '$shipcontact', "; $query .= "shipemail = '$shipemail', "; $query .= "shipphone = '$shipphone', "; $query .= "shipaddress1 = '$shipaddress1', "; $query .= "shipaddress2 = '$shipaddress2', "; $query .= "shipcity = '$shipcity', "; $query .= "shipstate = '$shipstate', "; $query .= "shipzip = '$shipzip', "; $query .= "vatnumber = '$vatnumber', "; $query .= "techcontact = '$techcontact', "; $query .= "techemail = '$techemail', "; $query .= "techphone = '$techphone' "; $query .= " WHERE id = '$uid'"; $result = mysql_query($query); } // Get the customer data for editing $cid = $uid; include("management/inc/selectcustomer.php"); if($s == "savecustomerpassword" and $password and $cid > 0){ $passworderr = ""; if(strlen($newpassword1) < 6){ $passworderr = "The new password is not long enough. Make sure it is at least 6 alphanumeric characters."; } if(!ctype_alnum($newpassword1)){ $passworderr = "Only use alphanumeric characters in the new password."; } if($newpassword1 != $newpassword2){ $passworderr = "The new passwords did not match. Make sure you enter the new password twice."; } if($oldpassword != $password){ $passworderr = "The password did not match what we have on record."; } if($passworderr == ""){ $query = "UPDATE Y_customers SET "; $query .= "password = '$newpassword1' "; $query .= " WHERE id = '$cid'"; $result = mysql_query($query); $password = $newpassword1; $s=""; }else{ $s="editcustomerpassword"; } } if($s=="editcustomeraccount"){ ?>

Edit Account


Contact Info


Company:

Contact:

Technical Contact:

Technical Email:

Technical Phone:

Email:

Phone:

Country:


Billing Address


Company:

Contact:

Email:

Phone:

Address 1:

Address 2:

City:

State:

Zip/Postcode:

Tax Number:

Delivery Address


Company:

Contact:

Email:

Phone:

Address 1:

Address 2:

City:

State:

Zip:

Change Password


$passworderr

"; } ?>

For security, please enter your old password.

Old Password:

Please enter the new password twice. Use at least 6 alphanumeric characters.

New Password:

New Password:

Account


General Contact Details

Company:
Contact:
Email:
Phone:
Country:
ID:

Billing Details

Company:
Contact:
Email:
Phone:
Address:"; if($payaddress2){ echo $payaddress1 . "
"; } echo $paycity . "
"; echo $paystate . "
"; echo $payzip . "
"; ?>

Delivery Details

Company:
Contact:
Email:
Phone:
Address:"; if($shipaddress2){ echo $shipaddress1 . "
"; } echo $shipcity . "
"; echo $shipstate . "
"; echo $shipzip . "
"; ?>
End Users'; $query = "SELECT * FROM Y_customers WHERE parentid = '".$cid."' ORDER BY company"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ echo '
'; echo '
'.$row['company'].' '.$row['contact'].' '.$row['email'].'
'; echo '
'; } } ?>

Account Inventory


0){ $query9 = "SELECT *, Y_inventory.id AS idid FROM Y_inventory, Y_products WHERE Y_inventory.productid = Y_products.id AND Y_inventory.enduserid = '".$cid."' AND (Y_inventory.parentid IS NULL OR Y_inventory.parentid = '0') ORDER BY Y_inventory.status DESC, Y_inventory.purchasedate DESC"; $result9 = mysql_query($query9); $listofoptions = ""; while($row9 = mysql_fetch_array($result9) and $i < 1000){ //if( substr($row9['productkey'], 0, 7) == "parent:"){ if(trim($row9['optionparent']) or trim($row9['maintenanceparent']) ){ //drawinventoryitem($row9['idid'], $cid, $utype); }else{ echoinventoryitem($row9['idid'], $cid, $utype); //strpos($row9['productkey'], "parent:") // Find the options that belong to this item! $query10 = "SELECT * FROM Y_inventory WHERE productkey = 'parent:".$row9['idid']."' OR maintenanceparent = '".$row9['idid']."'"; $result10 = mysql_query($query10); while($row10 = mysql_fetch_array($result10)){ echo '
'; echoinventoryitem($row10['id'], $cid, $utype); echo '
'; $listofoptions[$n] = $row10['id']; $n++; } echo '
'; } $i++; } // Now go through the list again and find any options that were missed due to not being assigned to a parent. $query9 = "SELECT *, Y_inventory.id AS idid FROM Y_inventory, Y_products WHERE Y_inventory.productid = Y_products.id AND Y_inventory.enduserid = '".$cid."' AND (Y_inventory.parentid IS NULL OR Y_inventory.parentid = '0') ORDER BY Y_inventory.status DESC, Y_inventory.purchasedate DESC"; $result9 = mysql_query($query9); if($debug){echo "

"; echo "Printing options with no parent.
" . $query9; echo "

"; } $i = 0; $f = 0; while($row9 = mysql_fetch_array($result9) and $i < 1000){ //if( substr($row9['productkey'], 0, 7) == "parent:"){ if(trim($row9['optionparent'])){ $goodtodraw = true; if($listofoptions){ reset($listofoptions); while (list($key, $val) = each($listofoptions) and $goodtodraw == true){ //echo "$key => $val
"; if($val == $row9['idid']){$goodtodraw = false;} } } if($goodtodraw == true){ if($f==0){echo "

Other Items

"; $f++;} echoinventoryitem($row9['idid'], $cid, $utype); } }else{ //drawinventoryitem($row9['idid'], $cid, $utype); } $i++; } } if($i == 0){ echo"

You own no items yet.

"; } } if($s == "history"){ ?>

Account History


0){ $query9 = "SELECT * FROM Y_purchasehistory WHERE customerid = '".$cid."' ORDER BY stamp DESC"; $result9 = mysql_query($query9); while($row9 = mysql_fetch_array($result9) and $i < 1000){ echohistoryitem($row9['id']); $i++; } } if($i == 0){ echo"

You own no items yet.

"; } } } if($s=="subscriptions"){ if($uid > 1000){ $subemail = $email; }else{ $subemail = $uemail; } ?>

Subscriptions


Print Manager Plus eUpdate

Keep up to date with our software updates and upgrades.

Unsubscribe

Print Manager Newsletter

Get news and important information regarding Print Manager.

Unsubscribe

ResellerWire Newsletter

Get news and important information for partners and resellers.

Unsubscribe

'; echo "

"; echo " " . date("m/d/Y", $row['stamp']) . " "; if(!$row['type'] or $row['type'] == ""){$row['type'] = "new";} if($row['type'] == "new"){ $type = "New order"; } if($row['type'] == "maint"){ $type = "Maintenance"; } if($row['type'] == "upgrade"){ $type = "Upgrade"; } $cur = "$"; if($row['currency'] == "euro"){ $cur = "€"; } if($row['currency'] == "gbp"){ $cur = "£"; } $total = $row['subtotal'] + $row['tax']; $row['optionids'] = trim($row['optionids']); ?> "; } ?>
Order Type:
Product:
Quantity:
Options: "; $options = explode(",",$row['optionids']); reset($options); $i=0; while (list($key, $val) = each($options)){ //echo "$key => $val
"; if($i > 0 and $options[$i]){echo ", ";} echo getproductfullname($options[$i], $row['type']); $i++; } echo "
Subtotal:
Tax:
Total:
"; echo '

'; } } function echoinventoryitem($iid, $cid, $utype){ $query9 = "SELECT *, Y_inventory.id AS idid, Y_products.id AS pdid FROM Y_inventory, Y_products WHERE Y_inventory.productid = Y_products.id AND Y_inventory.id = '".$iid."' AND (Y_inventory.parentid IS NULL OR Y_inventory.parentid = '0') ORDER BY Y_inventory.status DESC, Y_inventory.purchasedate DESC"; $result9 = mysql_query($query9); if($row9 = mysql_fetch_array($result9)){ echo '
'; echo "

"; echo "".$row9['amount'] ." X " . $row9['family'] . "
" . $row9['name'] . ""; if(strlen($row9['productkey'])>1){echo "
Key: " . $row9['productkey'] ;} if($row9['purchasedate']){echo "
Purchased: " . datetimeToDate($row9['purchasedate']);} //$dd = datetimeToDate($row9['expires']); // Check for download links if($row9['downloadlink']){ echo "
Click to download "; } echo "

Maintenance Expires: " . datetimeToDate($row9['expires']) . " "; // Place maintenance links if(!trim($row9['maintenanceparent'])){ // 7776000 seconds in 90 days //$itexpires2 = date("m/d/Y", $itexpires); $itexpires = strtotime($row9['expires']); // Unix time stamp of when it expires $itexpires2 = time()+ 7776000; // Now plus 90 days ahead $itexpires3 = time()+ 2592000; // Now plus 30 days ahead $itexpires4 = time(); // Now if($itexpires < $itexpires2){ // Maintenance expires within 90 days echo '

'; if($itexpires < $itexpires3){ // Maintenance expires within 30 days if($itexpires < $itexpires4){ // Maintenance has expired echo " EXPIRED Upgrade"; }else{ echo " Renew Maintenance"; } }else{ echo " Renew Maintenance"; } echo ' '; echo '
'; } } // Check for maintenance renewals // Check if there is already a quote for this cid and date /* if(($utype == "admin" or $utype == "sales" or $utype == "tech")){ if($row9['status'] == "Live"){ $query10 = "SELECT id FROM Y_quotes WHERE enduserid = '".$cid."' AND expires = '".$row9['expires']."'"; //echo $query10; $n = 0; $result10 = mysql_query($query10); while($row10 = mysql_fetch_array($result10)){ $n++; echo " Maint Quote $n | "; } echo " New Maint Quote"; } echo "
Inv ID: ".$row9['idid']; echo "
Edit | Duplicate | Delete "; } */ echo "

"; echo '
'; } } function checkprospectdetails($email, $company, $firstname, $lastname, $city, $phone, $type, $password1="", $password2=""){ // Check values $error = ""; //// Company $company = stripslashes_mysql($company); $company = trim($company); $companyClean = $company; $companyClean = strip_tags($companyClean); $companyClean = htmlspecialchars($companyClean); if(!$companyClean or $companyClean != $company){ $error .= "

There was a problem with the company name. Please fill it in, and for security reasons please avoiding special characters.

"; } //// Email $email = stripslashes_mysql($email); $email = strtolower(trim($email)); if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) and trim($email)){ // Good email // now check that it is not a duplicate if($type == "new"){ $result = mysql_query("SELECT email from Y_prospects WHERE LOWER(email) = '$email'"); if($row = mysql_fetch_array($result)){ $error .= "

That email address is already in use. Perhaps you should try to login and request your password.

"; }else{ $result = mysql_query("SELECT email from Y_customers WHERE LOWER(email) = '$email'"); if($row = mysql_fetch_array($result)){ $error .= "

That email address is already in use. Perhaps you should try to login and request your password.

"; } } } }else{ // Bad email $error .= "

There was a problem with the email address. Please check that you have entered in correctly.

"; } // First name $firstname = stripslashes_mysql($firstname); $firstname = trim($firstname); $firstnameClean = $firstname; $firstnameClean = strip_tags($firstnameClean); $firstnameClean = htmlspecialchars($firstnameClean); if(!$firstnameClean or $firstnameClean != $firstname){ $error .= "

There was a problem with your first name. Please fill it in, and for security reasons please avoiding special characters.

"; } // Last name $lastname = stripslashes_mysql($lastname); $lastname = trim($lastname); $lastnameClean = $lastname; $lastnameClean = strip_tags($lastnameClean); $lastnameClean = htmlspecialchars($lastnameClean); if(!$lastnameClean or $lastnameClean != $lastname){ $error .= "

There was a problem with your last name. Please fill it in, and for security reasons please avoiding special characters.

"; } // City $city = stripslashes_mysql($city); $city = trim($city); $cityClean = $city; $cityClean = strip_tags($cityClean); $cityClean = htmlspecialchars($cityClean); if(!$cityClean or $cityClean != $city){ $error .= "

There was a problem with the city. Please fill it in, and for security reasons please avoiding special characters.

"; } // Phone $phone = stripslashes_mysql($phone); $phone = trim($phone); $phoneClean = $phone; $phoneClean = strip_tags($phoneClean); $phoneClean = htmlspecialchars($phoneClean); if(!$phoneClean or $phoneClean != $phone){ $error .= "

There was a problem with the phone number. Please fill it in, and for security reasons please avoiding special characters.

"; } /* // Check username characters $new_com1 = ereg_replace("[^A-Za-z0-9-]", "", $usr); if($new_com1 != $usr and $oktocreate == true){ $oktocreate = false; $ret = "The username must be made up of alphanumeric characters. That is letters and numbers only."; } */ // Check password if($password1){ $password1 = trim($password1); $password2 = trim($password2); if($password1){ if(strlen($password1) < 5){ $error .= "

The password must contain at least five characters.

"; } if($password1 != $password2){ $error .= "

The password did not match the duplicate. Try again.

"; } } } return $error; } if( $action == "saveaccount"){ $error = ""; $error = checkprospectdetails($email, $company, $firstname, $lastname, $city, $phone, "new"); if($error){ echo "". $error . ""; $s = "newaccount"; }else{ // All good. Save the data // Y_prospects is used for logging in and out. Also add data to Y_leads // Generate the password $password = makerandompassword(); $insert = mysql_query("INSERT INTO Y_prospects( company, email, password, firstname, lastname, city, country, phone ) VALUES ( '".addslashes_mysql($company)."', '$email', '$password', '".addslashes_mysql($firstname)."', '".addslashes_mysql($lastname)."', '".addslashes_mysql($city)."', '".addslashes_mysql($country)."', '".addslashes_mysql($phone)."' ) SELECT LAST_INSERT_ID=@@IDENTITY "); $r = mysql_fetch_assoc($result); $uid = $r['LAST_INSERT_ID']; // Make the number negative as this indicates a prospect user id. $uid = $uid * -1; // Now log the user in $uid = loginuser($email, $password); $tuid = $uid; // keep a copy of the entry id for the Y_leads table if($tuid < 0){$tuid = $tuid * -1;} if($fasttrack){ // if this is not a fasttrack lead then the Y_lead data is filled in in the files/downloads.htm page. // Now add it to the leads table if a download. $sql = "Insert into Y_leads ( FirstName, LastName, Company, city, Country, phone, Email, Product, NTWire, hearabout, comment, prospectid ) values ( '".addslashes_mysql($firstname)."', '".addslashes_mysql($lastname)."', '".addslashes_mysql($company)."', '".addslashes_mysql($city)."', '".addslashes_mysql($country)."', '".addslashes_mysql($phone)."', '$email', '$dpro', '1', '', '', '$tuid' )"; $result = mysql_query($sql); // Email Bill with the lead $toemail = "bfeeley@printmanager.com"; $toname = "Bill Feeley"; $subject = "New Lead"; $fromemail = "support@printmanager.com"; $fromname = "Print Manager Service"; $textmessage = " First Name: $firstname Last Name: $lastname Company: $company City: $city Country: $country Phone: $phone Email: $email Product: $dpro "; $htmlmessage = nl2br($textmessage); include("management/mailman.php"); } if(is_numeric($uid) and $uid < 0){ echo '

You have created an account and you are now logged in. Your password has been sent to your email address. Please keep it on record for future use of our services.

'; // Send the password $toemail = $email; $toname = $firstname . " " . $lastname; $subject = "Your Print Manager password"; $fromemail = "support@softwareshelf.com"; $fromname = "Print Manager Service"; $textmessage = "Thank you for signing up to printmanager.com \n\n Here are your login details. \n\n Email: $email \n Password: $password"; $htmlmessage = nl2br($textmessage); $htmlmessage .= '

-----------------------------------------------


Print Manager
PO Box 209, Nevada City, CA 95959
USA Contact: 727-445-1920 | 800-962-2290 | Office Hours: 4:00am to 6:00pm PST
Europe Contact: +44-1342-310950 | 0800 048 8689 | Office Hours: 8:00am to 5:00pm GMT

Sales: sales@printmanager.com
Support: support@printmanager.com
Customer Service: service@printmanager.com
Website: http://www.printmanager.com '; // Send the actual email //include("mailer.php"); include("management/mailman.php"); //echo " - " . $mail->Username; if($fasttrack == "printmanagerplus"){ ?> Oops! That failed. Our fault. Please contact us for any help.

"; } } } if($uid == 0 and $action == "login" and $username and $password){ $uid = loginuser($username, $password); if($uid == 0){ echo "

Login failed. Please check your username and password.

"; }else{ if($urlref64){ $url = base64_decode($urlref64); ?> You are now logged in. Continue

"; } } if($uid == 0 and $action == "login" and $submit == "Lost Password"){ echo "

Lost Password

"; if($username){ $found = false; // Find out who this is - Check Y_customers $result = mysql_query("SELECT id, password, contact from Y_customers WHERE email = '$username'"); if($row = mysql_fetch_array($result)){ $found = true; $passtosend = $row['password']; // Send the actual email $fromemail = "support@printmanager.com"; $fromname = "Print Manager"; $htmlmessage = "

Your password for PrintManager.com was requested.

"; $htmlmessage .= "

Password: ".$passtosend."

"; $htmlmessage .= "

Best regards,
Software Shelf International

"; //$toemail = $row['email']; $toemail = $username; $toname = $row['contact']; $emailtype = "Password Reminder"; $subject = "Your Print Manager password"; //echo "

Send to: $toemail

"; //include_once("mail.php"); include("management/mailman.php"); } if($found == false){ // Find out who this is - Check Y_prospects $result = mysql_query("SELECT id, password, firstname, lastname from Y_prospects WHERE email = '$username'"); if($row = mysql_fetch_array($result)){ $found = true; $passtosend = $row['password']; // Send the actual email $fromemail = "support@printmanager.com"; $fromname = "Print Manager"; $htmlmessage = "

Your password for PrintManager.com was requested.

"; $htmlmessage .= "

Password: ".$passtosend."

"; $htmlmessage .= "

Best regards,
Software Shelf International

"; //$toemail = $row['email']; $toemail = $username; $toname = $row['firstname'] . " " . $row['lastname']; $emailtype = "Password Reminder"; $subject = "Your Print Manager password"; //echo "

Send to: $toemail

"; //include_once("mail.php"); include("management/mailman.php"); } } if($found){ echo "

Your password has been sent to ".$toemail."

"; }else{ echo "

Sorry - We could not find your details. Please contact Print Manager.

"; } }else{ echo "

You need to enter an email address.

"; } } if($s == "newaccount"){ ?>

Company:*

Email:*

First Name:*

Last Name:*

City:*

Country:*

Phone:*

 

Creating an account gives you access to our free trials.

The email address is your login username and also our contact email address for your organisation.

A password is automatically generated and sent to the email address.

* All fields are required.


The email address is our contact email address for your organisation.

The password is automatically generated and if you do not have it already we can send it to the email address - Simply enter your contact email address then click on the lost password button.

If you do not know which email address we hold for your organisation, please contact us now.

 

Email:

Password:

0 and $uid <=1000){ ?>
Mozart
 
Log Out