![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
DBookatay
-
Posts
334 -
Joined
-
Last visited
Posts posted by DBookatay
-
-
I have a cell in my dB named 'pur_date' with the "date" value: 2009-07-03.
How do I count the number of days (based on todays date) that it's been in inventory?
-
Wow, that simple hunh?
Thanks...
-
Hopefully someone can help with a simple problem:
The PHP
if(!$_GET['page']) {$_GET['page'] =1;} $num = '35'; $offset = ($_GET['page']-1) * $num; $query = "SELECT count(*) as thecount from photos"; $result = mysql_query($query); $row = mysql_fetch_array($result); $total = $row[thecount]; $pages = ceil($total/$num); $query = "SELECT * FROM photos WHERE category = '{$_GET['Gallery']}' and status = 'on' ORDER BY id limit $offset,$num"; $result = mysql_query($query); $numrows = mysql_num_rows($result); for($x = 0; $row = mysql_fetch_array($result); $x++) { $id = $row['id']; $body .= '<div id="img01" class="pic"><a href="Gallery/'.$id.'.jpg" rel="lightbox[Gallery]" title="" onmouseover="MM_swapImage(\'thmb'.$id.'\',\'\',\'Gallery/thumbs/on/'.$id.'.jpg\',1)" onmouseout="MM_swapImgRestore()"><img src="Gallery/thumbs/off/'.$id.'.jpg" id="thmb'.$id.'" alt="" /></a><p>'.$id.'A</p></div>'; }
Every thing is working correctly, the query and images are showing up but I need to change the image id for each result, since the CSS determines where on the page the image
should line up. Right now since their all named "img01" they are all laying on top of one another.
How do I make it so that each as the next sequential number: "img01", "img02", "img03", ... "img33", "img34", "img35".
-
Baically thats the same as saying "read the manual..."
Thanks for the loads of help, now instead of posting a quick question as an admitted user that knows little about javascript hoping for a quick answer, I'll go to Barnes & Noble and buy a book.
Lots of help on this forum...
-
Make a string not a number
How is this done? I know very little about js
-
I am creating PDF's unings 9.1 Pro and am having a problem with my "0"s being trimmed when I do not want them to. Here is an example:
var co_city = getField('co_city').value; var co_state = getField('co_state').value; var co_zip = getField('co_zip').value; if (co_city) { var co_add2 = co_city + ", " + co_state + " " + co_zip; } event.value = co_add2;
This script takes the users address fields "city" "state" and "zip" and returns them as 1 line: Danbury, CT 06810. Except the "06810" turns into "6810". How do I stop the "0"s from being trimmed?
The same result happens with dates. I use "dte1" + "dte2" + "dte3" = "date"
Should read "04/25/09" yet is returned as "4/25/9"
Any help would be greatly apprechiated.
-
If anyone is interested, I zipped all of the pdf forms, the php page that the screen caps show, and much clearer instructions on the task I am looking for, in a MS Word document.
The files are on my server, located here: http://www.login.carcityofdanbury.com/PHP_Freaks.zip
I hope to have this job complete by next weekend, so I will chose the person for the job on Monday or Tuesday, for anyone interested.
Once I hire someone, I will give 50% of the fee upfront (through Paypal), give them a temporary username and password to my site for access to the forms, and then after the job is complete and working correctly I will pay the remaining balance.
-
I have been recieving offers to do the job, but as of now I have not picked a person yet, I will in the next day or so.
I am currently trying to simplify the jargen, and anyone interested will recieve an email from me showing the PDF's, with the text inserted as I want it, along with the php source code.
One thing I wanted to make clear is that I don't want the programmer to do every different package option, meaning "AL / NY / Single" , "AL / CT / Joint" , "IH / CT / Single", "AL / NY / Single" , "AL / NY / Joint" , and so on... I am looking for someone to only do 1 or 2 of them, because I will look at your code, try to understand how you did what you did, then teach myself. (I am fully self taught, and I like to learn, not just pay to have it done everytime.)
Also, I have hired people off of this board before, and payment is not an issue. I am a verfied Paypal member, not looking to screw anyone out of their hard work.
I should have the email ready to be sent by the end of today, so anyone else that may be interested feel free to act now.
Thank you,
Brad Guy
Car City of Danbury LLC
-
After several attemps of trying to do this myself, I am taking bids on someone that can help me finish this script.
I own a used car dealership and after we sell a car there are several pieces of paperwork that are required in order to complete the transaction, the paperwork varies based on the type of "deal" and state that it is. Currently I sell 70% of my units in CT, and about 40% in NY. There are 3 types of "deals," Cash, Auto Loan (a finance company,) and In House (buy here / pay here financing).
I've created a form where my guys selected the state and type of deal that the sale is (see image 01) and it takes them to a page in our sites admin only section. Once (someone on Freaks helps me finish) the user inserts the necissary text into the fields, hits a button, and the PDF forms open as a package in a new window/tab and then prints.
I have already created all the PDFs and have manually been printing the information, but now I want to take it up a notch. To more clearly understand, here is an example:
For every NY / AL / Single buyer with no trade in I need the following forms:
"MV-82.pdf" (NYS registration / 2 pages)
"DTF-802.pdf" (NYS sales tax form / 1 page)
"MV-900.pdf" (NYS lien form / 1 page)
"Declaration.pdf" (customer down payment / 1 page)
"Contract.pdf" (finance contract / 4 pages)
"ACH.pdf" (withdrawl form / 1 page)
Then there are variables for the same deal:
If there is a trade-in with a lien holder: "H-12.pdf"
There are radio buttons for the following type of "AL Deal" with the choices: "B", "C", "D", "E", "L" and a PDF the coincides with each choices, so I need the correct PDF to print as well.
All the form fields on the website are created, and on the PDF's, now I need someone to program them up.
If someone is interested, or requires more information please email me and I will more clearly explain myself, and send them the PDF "packages" that were created.
[attachment deleted by admin]
-
-
Thank you, this is it:
date_default_timezone_set('America/New_York'); echo date('g:i a');
-
On my site it lists my business hours, and includes the current time:
echo date('g:i a');
Problem is I just switched hosting companies and theres a 3 hour time difference now. I'm in in the Eastern Time Zone and they are in the Pacific Time Zone.
How do I add the 3 hours to my code?
-
I found a JS $_GET script that extracts information from the url, like php does, but I need help editing it.
The first script is:
function jsGet(type){ if(location.href.match(type)){ return location.href.split(type+'=')[1].split('&')[0]; }} document.write(jsGet('vin'));
In a .html page if the url is www.test.html?vin=354 the page displays "354" fine.
I am learning to create pdfs with Acrobat 9 and know that it supports javascript,but uses
event.value = something;
How can I edit the first script to display the "354" in a chosen field?
Did I explain myself properly?
-
Anyone? Does anyone know how to stop java script from trimming off the 0?
-
I am creating PDS's using Acrobat 9 and use javascripts to achieve certian functions, and js is taking 0's off of certian fields. Meaning if dte1 is "01", and dte2 is "05" and dte3 is "09" the result of date comes out as "1/5/9", instead of "01/05/09".
Another example is this code, which combines "city" + "state" + "zip".
var co_city = getField('co_city').value; var co_state = getField('co_state').value; var co_zip = getField('co_zip').value; if (co_city) { var co_add2 = co_city + ", " + co_state + " " + co_zip; } else { var co_add2 = " "; } event.value = co_add2;
If co_zip starts with a "0" it doesnt display it.
Any help, I'd really apprechiate it...
-
Solved by myself (Incase someone needs it in the future)...
Under the "Calculate" tab, enter the following in the "Custom calculation script"
// Get field values var pri_nmF = getField('pri_nmF').value; var pri_nmM = getField('pri_nmM').value; var pri_nmL = getField('pri_nmL').value; // Build full_name string var pri_name = pri_nmL + ", " + pri_nmF + ", " + pri_nmM + "."; // Set this field's value equal to full_name event.value = pri_name;
-
-
I'm new to Acrobat, and have a question that hopefully someone can help me with.
I took multiple forms and compined them togather to create what I call a "package," that way I enter the information on page 1, and it populates it across the other 9 pages where its supposed to go.
Only issue is, some of the forms use ____Last_______ , ________First_________, __M__
and some just use _______Name________.
Is there a way to combine "Last" + "," + "First" + "," + "M" automatically?
-
how do I determine what $last is?
"120" was just a number I picked as an example.
-
I have a script that displays how many pages (of search results) are available, like the one on this forum, however I do not know how to "trim" it, so it will look like my topic subject:
Page: 1 [2] 3 4 5 6 ... 120
Currently it returns ALL 120 pages.
Here is how I wrote the script, and ideas or changes would be greatly apprechiated...
$offset = ($_GET['page']-1) * 20; $query = "SELECT count(*) as thecount from Sold $where"; $result = mysql_query($query); $row = mysql_fetch_array($result); $total = $row[thecount]; $pages = ceil($total/20); $query = "SELECT * FROM Sold $where ORDER BY $order limit $offset,20"; $result = mysql_query($query); $numrows = mysql_num_rows($result); for($x = 0; $row = mysql_fetch_array($result); $x++) { [bUNCH OF PHP STUFF GOES HERE] }
Then on the bottom of the page, where the links are:
Page: <? for($x = 1; $x<= $pages ; $x++) {if($_GET['page'] != $x) { echo '<a href="list.php?category='.$_GET['category'].'&page='.$x.'">'.$x.'</a>';} else {echo $x;}}?>
-
When you edit a column you have to set a WHERE param.
UPDATE Website SET logo = '$logo', last_updated = '$updated' WHERE something='something'
thanks, dropfaith, for slapping the back of my head on that one.
WOW, I feel like a REAL iddiot!!!
Thanks for all the help!
-
Ok, this is what I got:
UPDATE Website (logo, last_updated) VALUES ('Default', '2008-19-11')You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(logo, last_updated) VALUES ('Default', '2008-19-11')' at line 1
-
something like
if ($_POST['edit']) { $logo = $_POST['logo']; $updated = '20'.$_POST['lstUpdte3'].'-'.$_POST['lstUpdte2'].'-'.$_POST['lstUpdte1']; $query = "UPDATE Website (logo, last_updated) VALUES ('$logo', '$updated')"; mysql_query($query)or die(mysql_error());}
Copied and pasted your code exactly and got this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(logo, last_updated) VALUES ('Default', '2008-19-11')' at line 1
-
try removing the word SET, if that doesn't fix it echo out the query and post it here
Removing SET didnt work...
What am I supposed to do now, I didnt understand the second part of your post.
[SOLVED] Help counting the number of days in inventory
in PHP Coding Help
Posted
I'm obviously doing something wrong cause this is not returning the right number of days...