Jump to content

winuser2003

Members
  • Posts

    110
  • Joined

  • Last visited

Everything posted by winuser2003

  1. The app just directly puts the data directly into the myql db... There is an interface with form fields that get filled in, then what happens is the final step is a signature. All this is directly sent into the Mysql DB for review on a management UI which is what you and I are working together on at the moment. I know nothing of flutter / DART whatsoever... a collegue of mine is coding that part making his app connect to my DB and sending those entries directly to it. You can see from the actual DB below... this is what we been using for testing
  2. am I also still passing in sign_x and sign_y as TEXT? I appreciate you helping me out with this project... very close to closing it... thankfully.
  3. Can you help me do this? if this is a better method? how would the script look? and your result is exactly what I am looking for.
  4. Updated working code -- other than the coordinate error we are getting now- --- : <?php mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); $conn = mysqli_connect("localhost", "winuser2003", "homer123", "pmapptest"); $tdata = ''; $res = $conn->query("SELECT userid, fname, lname, sign_x, sign_y FROM winuser_demo"); $conn->query("SELECT userid, fname, lname, sign_x, sign_y FROM winuser_demo"); foreach ($res as $r) { $tdata .= "<tr><td>{$r['userid']}</td> <td>{$r['fname']}</td> <td>{$r['lname']}</td> <td>" . drawImage($r['sign_x'], $r['sign_y']) . "</td>\n"; } function drawImage($xcoords, $ycoords) { $xa = explode(',', $xcoords); $ya = explode(',', $ycoords); $w = max($xa)+10; $h = max($ya)+10; $path = "M $xa[0] $ya[0] "; unset($xa[0], $ya[0]); foreach ($xa as $i => $x) { $y = $ya[$i]; $path .= "L $x $y "; } $im = "<svg width='$w' height='$h' > <path d='$path' stroke='#000' fill='none'/> </svg>"; return $im; } ?> <!DOCTYPE html> <html> <head> <style type="text/css"> table { border-collapse: collapse; width: 60%; } th { background-color: black; color: white; padding: 8px; text-align: left; } td { padding: 4px 8px;; } </style> </head> <body> <table border="1" style="width: 60%;"> <tr><th>ID</th> <th>First name</th> <th>Last name</th> <th>Image</th> <tr> <?=$tdata?> </table> </body> </html>
  5. Did that this is the result Can you try entering these coordinates in? Sign_X [44, 44, 44, 45, 45, 45, 45, 45, 45, 43, 42, 41, 40, 39, 39, 39, 37, 37, 37, 37, 37, 37, 37, 39, 40, 43, 47, 47, 49, 51, 52, 52, 53, 54, 55, 57, 58, 59, 64, 68, 73, 80, 85, 89, 93, 94, 94, 95, 95, 95, 93, 91, 89, 87, 85, 83, 81, 79, 75, 75, 72, 69, 66, 63, 60, 57, 55, 52, 50, 47, 45, 43, 41, 41, 41, 123, 124, 124, 123, 122, 119, 117, 111, 105, 100, 94, 89, 85, 82, 78, 76, 75, 73, 73, 72, 72, 72, 72, 75, 77, 79, 81, 83, 83, 87, 91, 95, 101, 109, 118, 127, 137, 144, 150, 153, 155, 155, 155, 155, 155, 155, 154, 154, 153, 150, 147, 147, 145, 144, 144, 144, 144, 144, 149, 152, 155, 158, 163, 167, 170, 176, 184, 191, 197, 201, 203, 204, 205, 206, 206, 206, 205, 203, 203, 202, 202, 202, 202, 202, 202, 202, 204, 207, 210, 213, 219, 220, 222, 223, 224, 226, 228, 230, 234, 237, 242, 246, 252, 259, 269, 278, 287, 293, 301, 309, 316, 325, 333, 340, 345, 345, 343, 341, 341, 339, 335, 332, 329, 327, 327, 327, 327, 328, 328, 329, 329, 332, 332, 335, 336, 338, 339, 343, 343, 346, 346] Sign_Y [39, 45, 50, 58, 72, 86, 91, 97, 102, 106, 108, 111, 112, 114, 114, 112, 108, 102, 98, 92, 86, 81, 75, 69, 65, 60, 56, 55, 53, 50, 50, 48, 48, 48, 48, 48, 46, 46, 47, 48, 51, 53, 55, 58, 60, 61, 62, 66, 70, 76, 80, 84, 86, 89, 93, 94, 97, 99, 101, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 72, 72, 71, 69, 68, 65, 64, 62, 61, 61, 61, 61, 61, 61, 62, 64, 64, 66, 68, 71, 76, 81, 86, 92, 94, 96, 100, 102, 102, 104, 104, 104, 104, 104, 101, 98, 94, 91, 86, 84, 80, 78, 76, 74, 73, 72, 71, 70, 69, 71, 75, 76, 82, 86, 92, 95, 98, 102, 105, 108, 108, 110, 111, 111, 111, 110, 106, 102, 98, 94, 91, 88, 84, 82, 79, 77, 74, 71, 70, 68, 68, 66, 66, 65, 64, 63, 62, 62, 59, 58, 57, 57, 56, 56, 56, 56, 58, 58, 60, 61, 63, 64, 66, 68, 68, 68, 68, 68, 65, 63, 59, 55, 51, 50, 47, 47, 48, 50, 51, 52, 55, 57, 58, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 51, 50, 50, 48, 47, 47, 46, 46]
  6. FYI the more in depth we go with the assistance, the more payment I push out. Being a dev myself, I understand how much time and work it takes.... so I always pay for the help and assistance.
  7. question 1 : is there a set limit to these coordinates? example signatures will have about 1000 points that it will need to graph out this is sign_x [44, 44, 44, 45, 45, 45, 45, 45, 45, 43, 42, 41, 40, 39, 39, 39, 37, 37, 37, 37, 37, 37, 37, 39, 40, 43, 47, 47, 49, 51, 52, 52, 53, 54, 55, 57, 58, 59, 64, 68, 73, 80, 85, 89, 93, 94, 94, 95, 95, 95, 93, 91, 89, 87, 85, 83, 81, 79, 75, 75, 72, 69, 66, 63, 60, 57, 55, 52, 50, 47, 45, 43, 41, 41, 41, 123, 124, 124, 123, 122, 119, 117, 111, 105, 100, 94, 89, 85, 82, 78, 76, 75, 73, 73, 72, 72, 72, 72, 75, 77, 79, 81, 83, 83, 87, 91, 95, 101, 109, 118, 127, 137, 144, 150, 153, 155, 155, 155, 155, 155, 155, 154, 154, 153, 150, 147, 147, 145, 144, 144, 144, 144, 144, 149, 152, 155, 158, 163, 167, 170, 176, 184, 191, 197, 201, 203, 204, 205, 206, 206, 206, 205, 203, 203, 202, 202, 202, 202, 202, 202, 202, 204, 207, 210, 213, 219, 220, 222, 223, 224, 226, 228, 230, 234, 237, 242, 246, 252, 259, 269, 278, 287, 293, 301, 309, 316, 325, 333, 340, 345, 345, 343, 341, 341, 339, 335, 332, 329, 327, 327, 327, 327, 328, 328, 329, 329, 332, 332, 335, 336, 338, 339, 343, 343, 346, 346] this is sign_y [39, 45, 50, 58, 72, 86, 91, 97, 102, 106, 108, 111, 112, 114, 114, 112, 108, 102, 98, 92, 86, 81, 75, 69, 65, 60, 56, 55, 53, 50, 50, 48, 48, 48, 48, 48, 46, 46, 47, 48, 51, 53, 55, 58, 60, 61, 62, 66, 70, 76, 80, 84, 86, 89, 93, 94, 97, 99, 101, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 72, 72, 71, 69, 68, 65, 64, 62, 61, 61, 61, 61, 61, 61, 62, 64, 64, 66, 68, 71, 76, 81, 86, 92, 94, 96, 100, 102, 102, 104, 104, 104, 104, 104, 101, 98, 94, 91, 86, 84, 80, 78, 76, 74, 73, 72, 71, 70, 69, 71, 75, 76, 82, 86, 92, 95, 98, 102, 105, 108, 108, 110, 111, 111, 111, 110, 106, 102, 98, 94, 91, 88, 84, 82, 79, 77, 74, 71, 70, 68, 68, 66, 66, 65, 64, 63, 62, 62, 59, 58, 57, 57, 56, 56, 56, 56, 58, 58, 60, 61, 63, 64, 66, 68, 68, 68, 68, 68, 65, 63, 59, 55, 51, 50, 47, 47, 48, 50, 51, 52, 55, 57, 58, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 51, 50, 50, 48, 47, 47, 46, 46] Problem is if I plot these I get this -->
  8. Might if I pick your brain a little more?? its not much...
  9. Yep I knew it... now its working as expected.... Time for a cigarette thanks so much for your help... if you have PP I be glad to donate for your time.
  10. I got ya... yep makes sense now... when update that though I get this Latest Modification --- <?php mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); $conn = mysqli_connect("localhost", "winuser2003", "homer123", "pmapptest"); $tdata = ''; $res = ""; $conn->query("SELECT userid, fname, lname, sign_x, sign_y FROM winuser_demo"); foreach ($res as $r) { $tdata .= "<tr><td>{$r['userid']}</td> <td>{$r['fname']}</td> <td>{$r['lname']}</td> <td>" . drawImage($r['sign_x'], $r['sign_y']) . "</td>\n"; } function drawImage($xcoords, $ycoords) { $xa = explode(',', $xcoords); $ya = explode(',', $ycoords); $w = max($xa)+10; $h = max($ya)+10; $path = "M $xa[0] $ya[0] "; unset($xa[0], $ya[0]); foreach ($xa as $i => $x) { $y = $ya[$i]; $path .= "L $x $y "; } $im = "<svg width='$w' height='$h' > <path d='$path' stroke='#000' fill='none'/> </svg>"; return $im; } //////NOTES//// The $res is whats confusing me the original shows $res = $db->query("SELECT userid , fname , lname , sign_x , sign_y FROM winuser_demo "); I removed the DB query and reformatted it like shown, but I know that will not effect it... however I am wondering about the invalid argument error its throwing now. I bet I broke that $res statement .... didn't I...
  11. A little progress... since I added that line I get the following error Notice: Undefined variable: db in C:\xampp\htdocs\testtest001.php on line 4 Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\testtest001.php on line 4 --( Not sure why this would error though ) -- there is only 1 member and its calling all the values correctly <?php $conn = mysqli_connect("localhost", "winuser2003", "homer123", "pmapptest"); $tdata = ''; $res = $db->query("SELECT userid , fname , lname , sign_x , sign_y FROM winuser_demo "); foreach ($res as $r) { $tdata .= "<tr><td>{$r['userid']}</td> <td>{$r['fname']}</td> <td>{$r['lname']}</td> <td>" . drawImage($r['sign_x'], $r['sign_y']) . "</td>\n"; } function drawImage($xcoords, $ycoords) { $xa = explode(',', $xcoords); $ya = explode(',', $ycoords); $w = max($xa)+10; $h = max($ya)+10; $path = "M $xa[0] $ya[0] "; unset($xa[0], $ya[0]); foreach ($xa as $i => $x) { $y = $ya[$i]; $path .= "L $x $y "; } $im = "<svg width='$w' height='$h' > <path d='$path' stroke='#000' fill='none'/> </svg>"; return $im; } ?> <!DOCTYPE html> <html> <head> <style type="text/css"> table { border-collapse: collapse; width: 60%; } th { background-color: black; color: white; padding: 8px; text-align: left; } td { padding: 4px 8px;; } </style> </head> <body> <table border="1" style="width: 60%;"> <tr><th>ID</th> <th>First name</th> <th>Last name</th> <th>Image</th> <tr> <?=$tdata?> </table> </body> </html>
  12. maybe I need to do something like this --- <?php $conn = mysqli_connect("localhost", "****", "****", "pmapp"); $tdata = ''; $res = $db->query("SELECT userid , fname , lname , sign_x , sign_y FROM winuser_demo "); foreach ($res as $r) { $tdata .= "<tr><td>{$r['userid']}</td> <td>{$r['fname']}</td> <td>{$r['lname']}</td> <td>" . drawImage($r['sign_x'], $r['sign_y']) . "</td>\n"; } function drawImage($xcoords, $ycoords) { $xa = explode(',', $xcoords); $ya = explode(',', $ycoords); $w = max($xa)+10; $h = max($ya)+10; $path = "M $xa[0] $ya[0] "; unset($xa[0], $ya[0]); foreach ($xa as $i => $x) { $y = $ya[$i]; $path .= "L $x $y "; } $im = "<svg width='$w' height='$h' > <path d='$path' stroke='#000' fill='none'/> </svg>"; return $im; } ?>
  13. Your DB version is exactly what I am looking for, just for some reason when I apply the sample code for testing on my side... I get this... I am trying to figure out why and it maybe due to versioning? maybe a newer version of sql? cause really all it could be is the DB is created, copy and paste the script into a test .php file and see if you see the output.... am I wrong? I do apologize for my ignorance here... it gets frustrating at times. If you look at the first post you will see I am using sqli $conn = mysqli_connect("localhost", "****", "****", "pmapp"); creating my connection. Maybe I can modify the first example you gave me to do that? I do apologize I meant mysqli NOT mysqlite.. .. poorly chosen words. Your first example though is right on what I am looking for.
  14. I think the issue is doesn't PDO use the DB-> exec command? thinking this is a versioning problem because I am using sqlite, and not sure at this point if that matters or not.
  15. Again, I am sure this is something obvious I am missing here...
  16. I got the DB and the entry to go in, as shown... will I need to create something in regards like a connectdb.php? cause the output on the php page is giving an error when I run this script and I know its just showing part of the code... maybe I am missing something in the obvious here... error I get $tdata = ''; foreach ($res as $r) { $tdata .= "{$r['userid']} {$r['fname']} {$r['lname']} " . drawImage($r['sign_x'], $r['sign_y']) . "\n"; } function drawImage($xcoords, $ycoords) { $xa = explode(',', $xcoords); $ya = explode(',', $ycoords); $w = max($xa)+10; $h = max($ya)+10; $path = "M $xa[0] $ya[0] "; unset($xa[0], $ya[0]); foreach ($xa as $i => $x) { $y = $ya[$i]; $path .= "L $x $y "; } $im = maybe a version conflict? just trying to replicate your demo...
  17. That is correct, because whats happening is at the very end of the phone application process, I take my finger and sign into a input field, which basically is my signature. Once submitted the signature is translated into coordinates in the database table as you can tell. All I want is the signature to show up on the php page itself like you have in your example. Definitely on the right track, I will try this.
  18. Hi, I am working on a project that involves mobile (android) and the application being designed connects to the database within PHPMYADMIN storing some table data entries. The language on the app being used is Flutter / DART and I do apologize, I am not familar at all with this language and my collegue has been writing his mobile code in this. I am the one who is going in and writing the PHP code that tells the data from the mobile app to be stored in a table. Hopefully this makes sense to you all still... Now... as shown below a diagram of how we have this app kicking and talking. Thank for whom all can assist with this, but this is really the last piece of the puzzle then the app is finally done. php output code: <!DOCTYPE html> <html> <head> <title>Test</title> <style> table { border-collapse: collapse; width: 100%; color: #588c7e; font-family: monospace; font-size: 25px; text-align: left; } th { background-color: #588c7e; color: white; } tr:nth-child(even) {background-color: #f2f2f2} </style> </head> <body> <table> <tr> <th>Id</th> <th>First Name</th> <th>Last Name</th> <th>Image</th> </tr> <?php $conn = mysqli_connect("localhost", "****", "****", "pmapp"); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT id, first_name, last_name FROM pmvisit"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo "<tr><td>" . $row["id"]. "</td><td>" . $row["first_name"] . "</td><td>" . $row["last_name"]. "</td></tr>"; } echo "</table>"; } else { echo "0 results"; } $conn->close(); ?> </table> </body> </html>
  19. I figured it out, man I make Dumb and Dumber look like Einsteins compared to my head. I told you the obvious does not come to me right away... sorry again
  20. This is getting so frustrating, I am trying to put in the <a> tags and its still linking for some reason. Can you show me an example?
  21. You found the code here in the common.php file I noticed, correct me if I am wrong. I am looking through it a bit and I will let you know when I cannot find anything that will help the link I am trying to remove. This will take a little time and hope I do find it. Here is the common.php file code... <?php // ---------------------------------------------------------------------- // File : common.php // Description : common functions used in printing HTML screens and // state management // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- // Function : pagestart() // Description : prints the beginning of a HTML page to the browser // Usage : pagestart() // // ---------------------------------------------------------------------- function pagestart() { global $ApplicationName; print("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"); print("<html>\n"); print("<head>\n"); print(" <title>$ApplicationName</title>\n"); print(" <link rel=stylesheet href=\"administration.css\" type=\"text/css\">\n"); //only reference char count javascript for the new store and edit store screens if (isset($_REQUEST['pageaction'])) { if ($_REQUEST['pageaction'] == "newstore" || $_REQUEST['pageaction'] == "editstore") { print(" <script type=\"text/javascript\" src=\"charcount.js\"></script>\n"); } } print("</head>\n"); print("<body"); if (isset($_REQUEST['pageaction'])) { if ($_REQUEST['pageaction'] == "editstore") { print(" onload=\"CheckFieldLengthsOnEdit()\""); } } print(">\n"); } // ---------------------------------------------------------------------- // Function : pageend() // Description : prints the end of a HTML page to the web browser // Usage : pageend() // // ---------------------------------------------------------------------- function pageend() { print("</body>\n"); print("</html>\n"); } // ---------------------------------------------------------------------- // Function : startpagecontainer() // Description : prints the start of a division which acts as a // container for all other pages elements // Usage : startpagecontainer() // // ---------------------------------------------------------------------- function startpagecontainer() { print("<div id=\"pagecontainer\">\n"); } // ---------------------------------------------------------------------- // Function : pageheader() // Description : prints a page header within the page container // Usage : pageheader() // // ---------------------------------------------------------------------- function pageheader() { global $SetConsole; global $consolelink; if (isset($SetConsole)) { //for future console controlling many applications if ($SetConsole=="ON") print(" <div id=\"console\"><a href=\"$consolelink\">Return to console</a></div>\n"); } print("<div id=\"pageheader\">\n"); print(" <div id=\"logocontainer\"><div id=\"logo\"><img src=\"images/logo.gif\"></div></div>\n"); } // ---------------------------------------------------------------------- // Function : startpagecontent() // Description : prints the start of a division for the main content // Usage : startpagecontent() // // ---------------------------------------------------------------------- function startpagecontent() { print("<div id=\"pagecontent\">\n"); } // ---------------------------------------------------------------------- // Function : mainmenu() // Description : prints the main menu // Usage : mainmenu() // // ---------------------------------------------------------------------- function mainmenu() { global $SetConsole; global $strAdminstate; print("<div id=\"mainmenu\">\n"); print("<div id=\"menuoptions\">\n"); print(" <div class=\"menuoption\"><a href=\""); if ($_SESSION['area']=="store") print $strAdminstate; print("\">"); //if ($_SESSION['area']=="store") // print("<img src=\"images/storeonbutton.gif\" border=\"0\">"); //else // print("<img src=\"images/storeoffbutton.gif\" border=\"0\">"); // print("</a></div>\n"); //Only let administrator and superusers access the user and state sections. //Further security is included in the pages contained in these sections. if ($_SESSION['accesslevel']=="Super" || $_SESSION['accesslevel']=="Administrator") { print(" <div class=\"menuoption\"><a href=\""); if ($_SESSION['area']=="state") print $strAdminstate; print("\">"); //if ($_SESSION['area']=="state") // print("<img src=\"images/stateonbutton.gif\" border=\"0\">"); // else // print("<img src=\"images/stateoffbutton.gif\" border=\"0\">"); // print("</a></div>\n"); if ($SetConsole != "OFF") { print(" <div class=\"menuoption\"><a href=\""); if ($_SESSION['area']=="user") print $strAdminstate; print("\">"); // if ($_SESSION['area']=="user") // print("<img src=\"images/useronbutton.gif\" border=\"0\">"); //else // print("<img src=\"images/useroffbutton.gif\" border=\"0\">"); //print("</a></div>\n"); } } print("</div>\n"); // end menu options div print("<div id=\"userstatus\">"); if ($SetConsole != "OFF") print(""); print("</div>\n"); print("</div>\n"); // end main menu div print("</div>\n"); // end pageheader div } // ---------------------------------------------------------------------- // Function : endpagecontent() // Description : closes page content div // Usage : endpagecontent() // // ---------------------------------------------------------------------- function endpagecontent() { print("</div>\n"); } // ---------------------------------------------------------------------- // Function : endpagecontainer() // Description : prints the end of a division which acts as a // container for all other page elements // Usage : endpagecontainer() // // ---------------------------------------------------------------------- function endpagecontainer() { print("</div>\n"); } // ---------------------------------------------------------------------- // Function : screenheading() // Description : prints a heading in the content area // Usage : screenheading($strHeading) // Arguments : $strHeading - text to display in heading // // ---------------------------------------------------------------------- function screenheading($strHeading) { print("<div id=\"screenheading\">$strSub</div>\n"); } // ---------------------------------------------------------------------- // Function : display_paged_navigation // Description : diplays the page navigation links when a search // result has more than 1 page of records // Usage : displaypagednavigation($intTotalpages,$intPage) // Arguments : $intTotalpages - total number of results found during // the search // $intPage - the current page identifier // // ---------------------------------------------------------------------- function display_paged_navigation($intTotalpages,$intPage) { global $intChaptersize; // how many pages per chapter - see settings.php global $strNavadminstate; // only show page navigation links if number of pages > 1 if ($intTotalpages > 1) { // calculate current chapter based on current page if (fmod($intPage, $intChaptersize) == 0) $intChapter = ($intPage/$intChaptersize); else $intChapter = ceil($intPage/$intChaptersize); // display paged record navigation bar print("<div id=\"pagenavcontainer\">\n"); print("<div id=\"pagenavigation\">\n"); // display previous chapter link if it exists if ($intChapter > 1) { print("<div id=\"pagenavprev\">"); print("<a href=\"{$_SERVER['PHP_SELF']}$strNavadminstate&pn=" . ((($intChapter-1)*$intChaptersize)-$intChaptersize+1) . ""); print("\">Prev $intChaptersize pages</a>"); print("</div>"); } // display page links $intStartat = (($intChapter*$intChaptersize) - ($intChaptersize - 1)); //print("startat: $intStartat<br>"); if ($intTotalpages < ($intChapter*$intChaptersize)) $intFinishat = $intTotalpages; else $intFinishat = ($intChapter*$intChaptersize); //print("finishat: $intFinishat<br>"); for($x=$intStartat;$x<=$intFinishat;$x++) { if ($intPage == $x) { print(" <div class=\"pagenavbox\">[$x]</div>\n"); } else { print(" <div class=\"pagenavbox\"><a href=\"{$_SERVER['PHP_SELF']}$strNavadminstate&pn=$x"); print("\">$x</a></div>\n"); } } // display next chapter link if it exists if (($intChapter * $intChaptersize) < $intTotalpages) { print("<div id=\"pagenavnext\">"); print("<a href=\"{$_SERVER['PHP_SELF']}$strNavadminstate&pn=" . (($intChapter*$intChaptersize)+1) . ""); print("\">Next $intChaptersize pages</a>"); print("</div>"); } print("</div>\n"); // end pagenavigation div print("</div>\n"); // end pagenavcontainer div } // end if total pages > 0 } // ---------------------------------------------------------------------- // Function : printmessage() // Description : prints a message box in the content area // Usage : printmessage($strMessage) // Arguments : $strMessage - text message to display in box // // ---------------------------------------------------------------------- function printmessage($strMessage) { print("<div id=\"adminmessage\">\n"); print("<div id=\"adminmessagetext\">$strMessage</div>\n"); print("</div>\n"); } // ---------------------------------------------------------------------- // Function : printconfirmmessage // Description : prints an action message with options to confirm or // cancel // Usage : printconfirmmessage($strMessage,$strConfirmlink, // $strCancellink) // Arguments : $strMessage - message to print // $strConfirmlink - link with address of page to go to // if you want to confirm the action // $strCancellink - link that takes you back if you // elect to cancel action // // ---------------------------------------------------------------------- function printconfirmmessage($strMessage,$strConfirmlink,$strCancellink) { global $strAdminstate; print("<div id=\"adminmessage\">\n"); print("<div id=\"confirmmessagetext\">$strMessage</div>"); print("<div id=\"confirmmessagelinks\"><a href=\"$strConfirmlink\">Yes</a> <a href=\"$strCancellink\">Cancel</a></div>\n"); print("</div>\n"); } // ---------------------------------------------------------------------- // Function : get_admin_state // Description : return part of a querystring which can be added to // links to maintain search state, or return the same // information in hidden form elements // Usage : get_admin_state($intMode) // Arguments : $intMode - identifies whether to return querystring // components for general or page navigation // links, or whether to return hidden form // elements // // ---------------------------------------------------------------------- function get_admin_state($intMode) { global $setdebug; global $strLastrec; $strAdminstate = ""; $strAdminstatelastrec = ""; $strNavadminstate = ""; $strFormadminstate = ""; if (isset($_REQUEST['key'])) { if ($_REQUEST['key'] != "") { $strAdminstate .= "&key=" . urlencode($_REQUEST['key']); $strFormadminstate .= "<input type=\"hidden\" name=\"key\" value=\"" . urldecode(urlencode($_REQUEST['key'])) ."\">"; } } if (isset($_REQUEST['pageaction'])) { //changes pageaction variable the when you first login to help build page navigation if ($_REQUEST['pageaction'] == "checklogindetails") { $tmppageaction = "storelist"; } else { $tmppageaction = $_REQUEST['pageaction']; } $strNavadminstate = "?pageaction=" . $tmppageaction . $strAdminstate; } //generate a second admin state variable for use in confirm delete to avoid showing //a page which doesn't exist anymore because the last row on that page has just been //deleted $strAdminstatelastrec = $strAdminstate; if (isset($_REQUEST['pn'])) { $strAdminstate .= "&pn=" . $_REQUEST['pn']; if ($strLastrec == "true") { $tmppn = $_REQUEST['pn']; $tmppn--; $strAdminstatelastrec .= "&pn=$tmppn"; } else { $strAdminstatelastrec = $strAdminstate; } $strFormadminstate .= "<input type=\"hidden\" name=\"pn\" value=\"" . $_REQUEST['pn'] . "\">"; } //return result based on $intMode supplied if ($intMode == 0) { //pass back querystring version of current state return $strAdminstate; } else if ($intMode == 1) { //pass back querystring version of current state for navigation links return $strNavadminstate; } else if ($intMode == 2) { //pass back hidden form variable version of current state return $strFormadminstate; } else if ($intMode == 3) { //pass modified admin state string for use when last row on a page is deleted return $strAdminstatelastrec; } } ?>
  22. Thanks for the understanding and sorry for the frustration. I am wondering where a hyperlink is coming from though. Lets say you go to the site and click on Submit a Party room. Put in something like test and scroll all the way down. Enter nothing in the captcha and click submit. You get the message correctly, however the message is also hyperlinked back to the administration area where I do not want people at. How would i remove this link??
  23. Thank you so much for all your help, I am sorry if I upset you earlier and thank you for being patient with me. I can catch something quick, somethings come a little longer than others. The obvious apparently does not slap me until its too late. Thank you again for all your help. -J
×
×
  • 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.