Jump to content

Phpnewbie23

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Everything posted by Phpnewbie23

  1. Cheers MadTechie that fixed it
  2. I am trying to include PHP_HTTP.dll. I have put it in my ext file location and included in my extensions in the php.ini But i am getting this error message when i load my php.ini or and script PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\php_http.dll' - The specified module could not be found. in Unknown on line 0 I have googled it but all the errors seem to be about on install. Cheers
  3. Hi Maq Its a web service API for Vembu StoreGrid WebServices API i have the api list but no idea where to start. Cheers James
  4. Hi Guys I was wondering if someone could help me in pointing me in the right. Direction of using PHP with APIs. Cheers James
  5. Thanks taquitosensei i did try this while i was testing after i posted the this and same error. Thanks James
  6. Hi Guys I keep getting With this code <?php include 'db_conn.php'; include 'define.php'; echo "<br>"; echo "<form method='POST' action='http://localhost/backup-report/test.html'>"; //javascript/popup/addpopup.js'>"; echo "select Client:<select name='Client'>"; foreach($clients as $client){ echo "<option value='1'>$client</option>"; } echo "</select>"; echo"<br>"; echo "<table id='table'>"; echo "<tr>"; echo "<td align=center>Type client name</td>","\n"; echo "<td align=center><input type='Text' value='Type Customer Name' /> </td>","\n"; echo "<td align=center><input type='Submit' value='Submit' /> </td>","\n"; echo "</tr>"; echo "</table>"; echo "</form>"; echo"<br>"; echo "<form action='rempopup.js' method='POST'>"; echo "<table id='table'>"; echo "<tr>"; echo "<td align=center>Type client name</td>","\n"; echo "<td align=center><input type='Text' value='Type Customer Name' /> </td>","\n"; echo "<td align=center><input type='Submit' value='Remove' /> </tdn";>","\n echo "</tr>"; echo "</table>"; echo "</form>"; ?> This happens when i click on the <?php echo "<td align=center><input type='Submit' value='Submit' /> </td>","\n"; ?> which should then run a .js script that dispalys a windows that runs the remove script that removes the customer from the define.php which builds the array All help greatly appricated any ideas????? Cheers James
  7. Thanks Yesideez yes that is sorted just but unfortnatly not need as i found out. Last night i just need this blooming combo box to sort out ahhhhhh
  8. Yes good suggestion lonewolf217 but we could be adding/deleting new clients. I wanted a easy and user friendly way for users to delete and add customers as not all the users are PC friendly
  9. Thanks lonewolf217 The issue i have just worked out is what i planned to do will not work at all...... GRRRRRRR > My Idea now is to create a text file with all clients names in it. Somehow populate the combo box with the clients names in php. Then on selecting Z company so the data for that company. Any ideas anyone i keep drawing blanks. Cheers James
  10. Thanks for the quick reply i tried which worked a treat.. thanks for that. My next issue i would like the combo box values to be shown alphabetical but my code below show this <--------------> Combo Item 1 Dog Combo Item 2 Dog Combo Item 3 Dog Combo Item 4 Dog Combo Item 5 Cat Combo Item 6 Cat Combo Item 7 Cat Combo Item 8 Cat Combo Item 9 Tree Combo Item 10 Tree Combo Item 11 Tree Combo Item 12 Tree <--------------> <?php include 'db_conn.php'; echo "<br>"; echo "<form action='index.php' method='POST'>"; echo "Client: <select name='Client'>"; while(odbc_fetch_row($rs)){ //($rs, $rownumber=0)) //(odbc_fetch_row($rs)) // array($rs) $client=odbc_result($rs,"BACKUP_LOCATION"); $alpha[] = odbc_fetch_row($rs); sort($alpha); foreach ($alpha as $key => $val) { $val = str_ireplace('D:/', '', $client); echo "<option value='null'>$val</option>"; } } echo '</select>'; ?> Again all help well appricated. Cheers James
  11. I am trying to remove the D:/ from an combo box populate by a ODBC connection. I have tired trim which seemed to work. But removed the D's from some of my values inside the combo box. See Example 1 Example using <?php $val = trim($client, 'D:/'); ?> <-----------> Combox Item1 D:/Dog Combox Item2 D:/Cat Combox Item2 D:/Tree <-----------> Example OutPut <-----------> Combox Item1 og Combox Item2 Cat Combox Item2 Tree <-----------> After that i tired substr Example using <?php echo substr($client,3); ?> <-----------> Combox Item1 D:/Dog Combox Item2 D:/Cat Combox Item2 D:/Tree <-----------> Example OutPut <-----------> Combox Item1 D:/Dog Combox Item2 D:/Cat Combox Item2 D:/Tree <-----------> Using trim i get the kind of result i am looking for but cannot work out why some of my values that start with a D for example Dog are removed. After that i would like to have my combo box values sorted alphabetically my code is kind of messed up has i have had a go at both and nearly got it working all help well appricated <?php include 'db_conn.php'; echo "<br>"; echo "<form action='index.php' method='POST'>"; echo "Client: <select name='Client'>"; while(odbc_fetch_row($rs)){ //($rs, $rownumber=0)) //(odbc_fetch_row($rs)) // array($rs) $client=odbc_result($rs,"BACKUP_LOCATION"); //$alpha[] = odbc_fetch_row($rs); //sort($alpha); //foreach ($alpha as $key => $val) { //$val = trim($client, 'D:'.'); echo substr($client,3); echo "<option value='null'>$client</option>"; } //} echo '</select>'; ?> Cheers James
  12. Does anyone know how i could resolve this please.... Cheers phpnewbie
  13. That was just the PHP code thats why there is not 96 lines. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Vembu StoreGrid Backup Moniter</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="styles.css" type="text/css" /> <script type="text/javascript" language="JavaScript" src="./javascript/overlib.js"></script> <script type="text/javascript" language="JavaScript" src="./javascript/overlib_positioncap.js"></script> <script type="text/javascript" language="JavaScript" src="./javascript/overlib_centerpopup.js"></script> <script type="text/javascript" language="JavaScript" src="./javascript/overlib_followscroll.js"></script> </head> <body> <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> <h1>Goldfield Backup Schedule <?php echo date("d/m/Y"); ?> </h1> <hr /> <div id="menucase"> <div id="stylefour"> <ul> <li><a href="http://www.vembu.com/" target="_blank">Vembu Website </a></li> <li><a href="http://www.vembu.com/forum/viewforum.php?f=1" target="_blank">Vembu Forum</a></li> <li><a href="http://www.vembu.com/technical-support.html" target="_blank">Vembu Support</a></li> <li><a href="SQLMoveLog.php">SQL Copy Log</a></li> <li><a href="Tools.php">Tools/Links (Under Construction)</a></li> </ul> </div> </div> <br> <p> Welcome to the Goldfield backup moniter. This moniter enables you to establish which clients have backed up or have not. If you have any problem please <a style="color: #000000" href= "mailto:james@goldfieldltd.com?subject=Vembu-Moniter"><u>click here</u> to contact me.</a><br /> <br> <u>Key:</u> <br /> <br /> <img src="./images/success-icon.gif"> Passed. <img src="./images/warning-icon.gif"> Backup Completed Partially. <img src="./images/error-icon.gif"> Failed. <br /> <br /> </p> <br> <?php include 'bytes.php'; //include 'smtp.php'; $color1 = "#FFFFCC"; $color2 = "#FFFFFF"; $row_count = 0; $conn=odbc_connect('STOREGRID','',''); if (!$conn) {exit("Connection Failed: " . $conn);} $sql="SELECT * FROM INCREMENTAL_BACKUP_REPORT"; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error In SQLITE Connection To Database");} $row_color = ($row_count % 2) ? $color1 : $color2; echo "<table id='table'>"; echo "<tr>"; echo "<th align=center><small>Client</small</th>"; echo "<th align=center><small>Backup Name</small></th>"; echo "<th align=center><small>Start Time</small></th>"; echo "<th align=center><small>End Time</small></th>"; echo "<th align=center><small>Skipped Files</small></th>"; echo "<th align=center><small>Files Added</small></th>"; echo "<th align=center><small>Files Deleted</small></th>"; echo "<th align=center><small>Files Modified</small></th>"; echo "<th align=center><small>Orignal File Size</small></th>"; echo "<th align=center><small>Disk Space Used</small></th>"; echo "<th align=center><small>Bandwidth Used</small></th>"; echo "<th align=center><small>Backup Status</small></th>"; echo "</tr>"; while (odbc_fetch_row($rs)) { $row_color = ($row_count % 2) ? $color1 : $color2; $client=odbc_result($rs,"CLIENT_NAME"); $backupname=odbc_result($rs,"BACKUP_NAME"); $start_time=odbc_result($rs,"BACKUP_START_TIME"); $end_time=odbc_result($rs,"BACKUP_END_TIME"); $skipfiles=odbc_result($rs,"NO_OF_FILES_SKIPPED"); $filesadded=odbc_result($rs,"NO_OF_FILES_ADDED"); $filedeleted=odbc_result($rs,"NO_OF_FILES_DELETED"); $filemodified=odbc_result($rs,"NO_OF_FILES_MODIFIED"); $fileoriginal=odbc_result($rs,"ORIGINAL_FILE_SIZE"); $diskspace=odbc_result($rs,"DISK_SPACE_USED"); $bandwidth=odbc_result($rs,"BANDWIDTH_USED"); $remarks=odbc_result($rs,"REMARKS"); echo "<tr>"; echo "<td bgcolor=$row_color nowrap align=center><small>$client</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$backupname</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>" . date("l d/m/Y H:i:s", $start_time) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>" . date("l d/m/Y H:i:s", $end_time) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$skipfiles</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filesadded</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filedeleted</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filemodified</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>". ByteSize($fileoriginal) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small> ". ByteSize($diskspace) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>". ByteSize($bandwidth) . "</small></td>","\n"; if ($remarks=="Success"){ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0' src='./images/success-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; }else if ($remarks=="Backup Completed Partially."){ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0' src='./images/warning-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; }else{ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0'src='./images/error-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; echo "</tr>"; } $row_count++; } echo "</table>"; echo"<br>"; odbc_close($conn); ?> </body> </html> The INCREMENTAL_BACKUP_REPORT table is 4403 records. Cheers james
  14. Here is the the PHP code <?php include 'bytes.php'; //include 'smtp.php'; $color1 = "#FFFFCC"; $color2 = "#FFFFFF"; $row_count = 0; $conn=odbc_connect('STOREGRID','',''); if (!$conn) {exit("Connection Failed: " . $conn);} $sql="SELECT * FROM INCREMENTAL_BACKUP_REPORT"; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error In SQLITE Connection To Database");} $row_color = ($row_count % 2) ? $color1 : $color2; echo "<table id='table'>"; echo "<tr>"; echo "<th align=center><small>Client</small</th>"; echo "<th align=center><small>Backup Name</small></th>"; echo "<th align=center><small>Start Time</small></th>"; echo "<th align=center><small>End Time</small></th>"; echo "<th align=center><small>Skipped Files</small></th>"; echo "<th align=center><small>Files Added</small></th>"; echo "<th align=center><small>Files Deleted</small></th>"; echo "<th align=center><small>Files Modified</small></th>"; echo "<th align=center><small>Orignal File Size</small></th>"; echo "<th align=center><small>Disk Space Used</small></th>"; echo "<th align=center><small>Bandwidth Used</small></th>"; echo "<th align=center><small>Backup Status</small></th>"; echo "</tr>"; while (odbc_fetch_row($rs)) { $row_color = ($row_count % 2) ? $color1 : $color2; $client=odbc_result($rs,"CLIENT_NAME"); $backupname=odbc_result($rs,"BACKUP_NAME"); $start_time=odbc_result($rs,"BACKUP_START_TIME"); $end_time=odbc_result($rs,"BACKUP_END_TIME"); $skipfiles=odbc_result($rs,"NO_OF_FILES_SKIPPED"); $filesadded=odbc_result($rs,"NO_OF_FILES_ADDED"); $filedeleted=odbc_result($rs,"NO_OF_FILES_DELETED"); $filemodified=odbc_result($rs,"NO_OF_FILES_MODIFIED"); $fileoriginal=odbc_result($rs,"ORIGINAL_FILE_SIZE"); $diskspace=odbc_result($rs,"DISK_SPACE_USED"); $bandwidth=odbc_result($rs,"BANDWIDTH_USED"); $remarks=odbc_result($rs,"REMARKS"); echo "<tr>"; echo "<td bgcolor=$row_color nowrap align=center><small>$client</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$backupname</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>" . date("l d/m/Y H:i:s", $start_time) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>" . date("l d/m/Y H:i:s", $end_time) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$skipfiles</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filesadded</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filedeleted</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filemodified</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>". ByteSize($fileoriginal) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small> ". ByteSize($diskspace) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>". ByteSize($bandwidth) . "</small></td>","\n"; if ($remarks=="Success"){ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0' src='./images/success-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; }else if ($remarks=="Backup Completed Partially."){ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0' src='./images/warning-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; }else{ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0'src='./images/error-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; echo "</tr>"; } $row_count++; } echo "</table>"; echo"<br>"; odbc_close($conn); The php code connects to a ODBC sqlite database collects the information and provides it in a table for the user to view. Thanks James
  15. Hi Guys Hopefully someone can help me i thought. TODAY i will have finshed my first PHP project but i get this error. PHP Fatal error: Out of memory (allocated 262144) (tried to allocate 4294967293 bytes) in C:\Inetpub\wwwroot\Backup-Report\index.php on line 96 Please help me ..... have changed my memory limit in the php.ini and dont know what else to do HELP.......
  16. One small problem i have found that it does not work in IE7 or IE8 only Mozilla In IE7-8 the images don't appear at all with the tooltip.
  17. Cheers unkwntech. ScotDiddle does the onmouseout="return nd(); mean on mouse out is gets rid of tool tip mine seem to be sticking until i refresh the page. Cheers James
  18. Cheers Scot L. Diddle you have given me exactly what i wanted brilliant brilliant ;D just another small question how the hell do you get rid of the blue box around the image. Thanks again Scot
  19. Hi Djkat Sorry yes i ment Java script. but would it matter if i wanted the tooltip text to ocome from a php varible. Cheers James
  20. Hi Scott Diddle Have you used overlib before i am trying to integrate it into my code i have follwed the documentation but the tooltip does not appear. This is my code. f ($remarks=="Backup Completed Partially.") echo "<td bgcolor=$row_color align=center><small><img src='./images/warning-icon.gif' align='center'<a href='javascript:void(0);'onmouseover='return overlib('$remarks).',STICKY, MOUSEOFF);'onmouseout='return nd();'>More Info</a></small></td>"; Cheers
  21. Hi Guys I would like to create tooltips for some images i have. For example: image (green tick) tool tip (backup completed). I have seen a few of java examples and not sure if you can but both together does anyone know how to or can point me in the right direction please. Kind regards James
  22. How do you change the font in PHP. For a example i have a table that is populated by a database. I have created <font size="1" face="arial"> THIS IS A TEST <?php THIS IS A TEST is the correct size and face and i believe i have my closing font tag in the correct place. odbc_close($conn); ?> </font> But the table text never goes to font specified it says at the stander ed size 3 . please help Cheers
  23. Thanks thorpe I understand your code but dont have a clue where to put it in mine? The issue i am having is my data is pulled from a a database using a ODBC connector. and has all the data is pulled out of INCREMENTAL_BACKUP_REPORT on refresh which i have to admit with help has taken me a while. What i would like to do now is have a combo box and populate it with my clients names and then pull all the other data out of the database. When the user selects that clients name here i below is my code so far. $conn=odbc_connect('VembuDSN','',''); if (!$conn) {exit("Connection Failed: " . $conn);} $sql="SELECT * FROM INCREMENTAL_BACKUP_REPORT"; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error in SQLITE CONNECTION");} echo "<table width=60% height=3% cellspacing='1' cellpadding='2' border='1'>"; echo "<tr>"; echo "<th align=center><small>Client</small</th>"; echo "<th align=center><small>Backup Name</small></th>"; echo "<th align=center><small>Start Time</small></th>"; echo "<th align=center><small>End Time</small></th>"; echo "<th align=center><small>Skipped Files</small></th>"; echo "<th align=center><small>Files Added</small></th>"; echo "<th align=center><small>Files Deleted</small></th>"; echo "<th align=center><small>Files Modified</small></th>"; echo "<th align=center><small>Orignal File Size</small></th>"; echo "<th align=center><small>Disk Space Used</small></th>"; echo "<th align=center><small>Bandwidth Used</small></th>"; echo "<th align=center><small>Backup Status</small></th>"; echo "</tr>"; while (odbc_fetch_row($rs)) { $client=odbc_result($rs,"CLIENT_NAME"); $backupname=odbc_result($rs,"BACKUP_NAME"); $start_time=odbc_result($rs,"BACKUP_START_TIME"); $end_time=odbc_result($rs,"BACKUP_END_TIME"); $skipfiles=odbc_result($rs,"NO_OF_FILES_SKIPPED"); $filesadded=odbc_result($rs,"NO_OF_FILES_ADDED"); $filedeleted=odbc_result($rs,"NO_OF_FILES_DELETED"); $filemodified=odbc_result($rs,"NO_OF_FILES_MODIFIED"); $fileoriginal=odbc_result($rs,"ORIGINAL_FILE_SIZE"); $diskspace=odbc_result($rs,"DISK_SPACE_USED"); $bandwidth=odbc_result($rs,"BANDWIDTH_USED"); $remarks=odbc_result($rs,"REMARKS"); echo "<tr>"; echo "<td align=center><small>$client</small></td>","\n"; echo "<td align=center><small>$backupname</small></td>","\n"; echo "<td align=center><small>" . date("l d/m/Y H:i:s", $start_time) . "</small></td>","\n"; echo "<td align=center><small>" . date("l d/m/Y H:i:s", $end_time) . "</small></td>","\n"; echo "<td align=center><small>$skipfiles</small></td>","\n"; echo "<td align=center><small>$filesadded</small></td>","\n"; echo "<td align=center><small>$filedeleted</small></td>","\n"; echo "<td align=center><small>$filemodified</small></td>","\n"; echo "<td align=center><small>$fileoriginal</small></td>","\n"; echo "<td align=center><small>$diskspace</small></td>","\n"; echo "<td align=center><small>$bandwidth</small></td>","\n"; if ($remarks=="Success"){ echo "<td align=center><small><font color='green'><b>$remarks</b></font></small></td>"; }else { echo "<td align=center><small><font color='Red'><b>$remarks</b></font></small></td>"; } echo "</tr>"; } echo "</table>"; odbc_close($conn); ?> Also how would you get rid of the border number ie 1 to go to 0 then have different colors for different rows like White Grey White Grey and so on i am sorry for asking so much questions and stupids one as well but i am new to PHP but would like to use it alot
  24. HI there Could please someone point me in the right direction on how to populate a HTML combo box with a sq value then populate the that clients data into a the a HTML table. I can post some code if that is use to anyone. Kid regards J
  25. i would like to populate a combo box with some database values. Then display them in a table and i was wondering how to do this. Cheers
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.