PHP - Php Ldap Search Error
Hi I am finding that I get a random LDAP search fail the initial time i run a script against 2008R2 when I refresh all is ok ? PHP 5.2.5 get the same thing with the latest version of PHP. any ideas ? its as if the DC is sleeping until you give it a nudge, running on 2008R2 running on vmware.
Similar TutorialsI have an application that uses the PHP LDAP library to connect to the Windows Active Directory:
$ds = ldap_connect($ini['ad_server']) or die("Could not connect");
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); I am wondering if anyone knows if this upcoming patch "2020 LDAP channel binding and LDAP signing" coming from Microsoft will break any PHP applications that are using this ldap library. Thanks in advance,
M I am having trouble using ldap_start_tls(). I am using the same code I have seen in a dozen different forums: $ds = ldap_connect($ldap['host'],$ldap['port']); ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); ldap_start_tls($ds); ldap_bind($ds,$ldap['user'],$ldap['pass']) ldap_close($ds); but I still receive the same error message: Warning: ldap_start_tls() [function.ldap-start-tls]: Unable to start TLS: Connect error The LDAP authentication had been working fine without the ldap_start_tls. I feel like I must have missed something big - is ldap_start_tls() dependent on having a local certificate? is OpenSSL a pre-requisite? I've seen lots of discussions turn towards OpenLDAP, but I had assumed this was only on the target server. Can anyone confirm that? Any help would greatly appreciated. Darren Hi, I am trying to search the employeeid value taken from an mssql db against a LDAP database. It works but when it cannot found the employeeid on the LDAP db it stops with this error: Catchable fatal error: Object of class variant could not be converted to string in ldap2.php on line 101 Here is the code. i've tried with ->value without success . Please help me. do { $sql = "SELECT EMPL.MATR FROM DOS ORDER BY DOS.MATR"; $result = mssql_query($sql); while ($myrow = mssql_fetch_array($result)) { $matr = $myrow['MATR']; $matr = intval($matr); //echo $matr; $strRS = "Select givenname,sn,displayName,mail,SAMAccountName,employeeid,cn from 'LDAP://dom.local/DC=dom,DC=local' where objectClass='user' and employeeid='$matr'"; $RS->Open($strRS, $Conn, 1, 1); echo $RS['cn']; echo "<br>"; $RS->Close; } $item++; // iterate count through ldapresults } while ($item < $Result['count']); echo '<hr />'; $Conn->Close; Hi folks, I am a complete n00b at php and mysql. I am teaching myself from books and the WWW, but alas I am stuck... the error I get is: Parse error: syntax error, unexpected T_STRING in X:\xampp\htdocs\search.php on line 7 here is the code: <?php mysql_connect ("localhost", "user", "password") or die (mysql_error()); mysql_select_db ("it_homehelp_test") or die (mysql_error()); $term = $_POST['term']; $sql = $mysql_query(select * from it_homehelp_test where ClientName1 like '%term%'); <<<------this is line 7 while ($row = mysql_fetch_array($sql)){ echo 'Client Name:' .$row['ClientName1']; echo 'Address:' .$row['Address1']; echo 'Phone:' .$row['Tel1']; } ?> Any help you can offer would be great. I can also post the ".html" file that creates the search bar if it is needed. Thanks I wrote wrong LDAP server for test but my script dont die! why ? in php.ini I wrote extension=php_ldap.dll and I have this lib in php/ext/ error_reporting(1); $ldaphost = 'my.office.company.com'; // Connecting to LDAP $ip = gethostbyname($ldaphost); $ldapconn = ldap_connect($ip) or die("Could not connect to $ldaphost"); echo 'done'; Hello everyone, I'm new to PHP and I have a question about a PHP Login page using LDAP. I have received a project from my boss. A project to digitizing a form. Well having that part done, my boss said to make login page that uses LDAP. A page that using the username and password from the AD to login and redirected to a different page. So that the person doesn't have to remember different usernames and passwords. Is there a simple script, doing this? Kind regards, Rinse Ringma ( Don't mind my bad English ) I'm using Active Directory and PHP with LDAP. I have been trying to create a script that will list all the members of each group in a OU. When I run this script in an OU with Users, it will return an array with all the available attributes of each User. However when I use it with a group, it doesn't return any attributes of the group. Code: [Select] <?php $ig_ldaphost="LDAP://domain/"; //filtered for security $ig_ldapou="OU=Drive Security,OU=Groups,DC=this,DC=and,dc=that"; //filtered for security $ig_ldapconn=ldap_connect($ig_ldaphost) or die("Could not connect to {$ig_ldaphost}"); $ig_ldapopt=ldap_set_option($ig_ldapconn,LDAP_OPT_PROTOCOL_VERSION,3) or die("Could not set options: {$ig_ldapopt}"); $ig_ldapbind=ldap_bind($ig_ldapconn) or die("Could not bind: {$ig_ldapbind}"); $ig_ldapsearch=ldap_search($ig_ldapconn,$ig_ldapou,"objectClass=*"); for ($ig_ldapentry=ldap_first_entry($ig_ldapconn,$ig_ldapsearch);$ig_ldapentry!=FALSE;$ig_ldapentry=ldap_next_entry($ig_ldapconn,$ig_ldapentry)) { $ig_ldapvalues=ldap_get_attributes($ig_ldapconn,$ig_ldapentry); $ig_ldapdn=ldap_explode_dn(ldap_get_dn($ig_ldapconn,$ig_ldapentry),1); echo "/".$ig_ldapdn[1]."/".$ig_ldapdn[0]."<br />"; var_dump($ig_ldapvalues); echo "<br /><br />"; } ldap_close($ig_ldapconn); ?> Can anyone help with this? Hi, I'm completely new to LDAP authentication but have managed to get a fairly smooth working script. However, I was wondering what is the easiest way to get a BASEDN from a Fully Qualified Domain Name. At the moment I have a loop which would take: example.com and turn it into dc=examplem,dc=com But is that the best way? Hi,
I haven't worked with PHP in years and was asked to debug something. Maybe you can help me out since I'm stuck. This error popped up when we upgraded from PHP 5.3 to 5.4.
It is setting LDAP options.
Here is the code:
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0) or die ("Could not set option referrals"); Both of these statement are throwing the following error message to the log. 52 is not a valid ldap link resource Anything I can check or look at? I am a little clueless here. Thanks Hi guys, I have this problem and id appreciate all your advice in helping solve it. I'm working on a service with is "cloud" hosted. However I want it so when a person employed by Corporation A logs onto myservice.corporationa.com they enter their Corporation A LDAP details but somehow that sends them to myservice.com and authenticates them. I know how to do the get LDAP details part to put on myservice.corporationa.com but no idea how to do the rest and make it send back etc. Any ideas? Many many thanks in advance. (PS - If this all makes sense please do let me know) I am having trouble authenticating users with LDAP. I can authenticate users when I use "CN" or "givenName" but not when I use "samaccountname", which is the username. CN is just the first + last name. Does anyone know why only CN and not samaccountname works? $strUsername = "test"; $strPassword = "pass"; $dn = 'samaccountname=' . $strUsername . ',OU=Staff,DC=mydomain,DC=com'; $strDomain = "ldap://localhost/"; $bolAuth = false; // connect to ldap server $port = "389"; $objConn = ldap_connect($strDomain); if ($objConn) { if ( $strPassword != null ) { $bolAuth = ldap_bind($objConn, $dn, $strPassword); if ( $bolAuth ) { $search_id = ldap_search($objConn, "OU=Staff,DC=mydomain,DC=com", "(samaccountname=".$strUsername.")"); $entries = ldap_get_entries($objConn, $search_id); if ($entries["count"] == 1) { $first_name = $entries[0]["givenname"][0];; $last_name = $entries[0]["cn"][0]; } } } ldap_close($objConn); } if($bolAuth==false){ echo "fail"; return false; } Hi, I'm working with the LDAP directory, and using PHP to access it. I am able to extract the name, departments and phone nos. from the directory. On the display page, i am looking to make the name column sort A-Z. (Like the "name" will be clickable and will sort the names from A-Z and Z-A ) Would appreciate if someone could suggest approaches to achieve this using PHP Thanks Hi Everyone, Hopefully someone will be able to assist with my problem. Basically, my situation is that we have a server which hosts multiple websites using multiple IP address. One of the new sites we are moving to this server needs an LDAP connection outside of our network. The outside LDAP has already been enabled to accept requests from the specific IP assigned to this site. However, other sites on this server are using other IP addresses. It seems as if the LDAP authentication request is getting sent by a IP address which is not authorized by the firewall on the outside LDAP server. Thus trouble authenticating. So, my question is, is there a way to force the ldap_bind request to use a specific IP address to send the request for authentication? Supposedly this can be done using an event handler. However, I don't have much experience with event handlers so am not sure how to go about doing this. I would appreciate any help or ideas to resolve this situation. Thanks! - Jodie Error: Warning: mysql_query() expects parameter 1 to be string, resource given in C:\Program Files\xampp\htdocs\NEW\search.php on line 35 Warning: mysql_num_rows() expects parameter 1 to be resource, null given in C:\Program Files\xampp\htdocs\NEW\search.php on line 36 Results Sorry, your search: "mod" returned zero results Click here to try the search on google 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 'Resource id #3 limit 0,10' at line 1 My PHP code <?php // Get the search variable from URL $var = @$_GET['q'] ; $trimmed = trim($var); //trim whitespace from the stored variable // rows to return $limit=10; // check for an empty string and display a message. if ($trimmed == "") { echo "<p>Please enter a search...</p>"; exit; } // check for a search parameter if (!isset($var)) { echo "<p>We dont seem to have a search parameter!</p>"; exit; } //connect to your database ** EDIT REQUIRED HERE ** mysql_connect("localhost","root",""); //(host, username, password) //specify database ** EDIT REQUIRED HERE ** mysql_select_db("school") or die("Unable to select database"); //select which database we're using // Build SQL Query $query = mysql_query("SELECT * FROM main WHERE username LIKE '%".$trimmed."%' ORDER BY username") or die(mysql_error()) ; // EDIT HERE and specify your table and field names for the SQL query $numresults=mysql_query($query); $numrows=mysql_num_rows($numresults); // If we have no results, offer a google search as an alternative if ($numrows == 0) { echo "<h4>Results</h4>"; echo "<p>Sorry, your search: "" . $trimmed . "" returned zero results</p>"; echo "<p><a href=\"http://www.google.com/search?q=" . $trimmed . "\" target=\"_blank\" title=\"Look up " . $trimmed . " on Google\">Click here</a> to try the search on google</p>"; } // next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; } // get results $query .= " limit $s,$limit"; $result = mysql_query($query) or die(mysql_error()) ; // display what the person searched for echo "<p>You searched for: "" . $var . ""</p>"; // begin to show results set echo "Results"; $count = 1 + $s ; // now you can display the results returned while ($row= mysql_fetch_array($result)) { $title = $row["1st_field"]; echo "$count.) $title" ; $count++ ; } $currPage = (($s/$limit) + 1); //break before paging echo "<br />"; // next we need to do the links to other results if ($s>=1) { // bypass PREV link if s is 0 $prevs=($s-$limit); print " <a href=\"$PHP_SELF?s=$prevs&q=$var\"><< Prev 10</a>  "; } // calculate number of pages needing links $pages=intval($numrows/$limit); // $pages now contains int of pages needed unless there is a remainder from division if ($numrows%$limit) { // has remainder so add one page $pages++; } // check to see if last page if (!((($s+$limit)/$limit)==$pages) && $pages!=1) { // not last page so give NEXT link $news=$s+$limit; echo " <a href=\"$PHP_SELF?s=$news&q=$var\">Next 10 >></a>"; } $a = $s + ($limit) ; if ($a > $numrows) { $a = $numrows ; } $b = $s + 1 ; echo "<p>Showing results $b to $a of $numrows</p>"; ?> Lines: Code: [Select] 35 == $numresults=mysql_query($query); 36 == $numrows=mysql_num_rows($numresults); 59 == $result = mysql_query($query) or die(mysql_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 'Resource id #3 limit 0,10' at line 1 Help Please.. Just take a look at the code.. idk whats wrong. <?php // Get the search variable from URL $var = @$_GET['q'] ; $trimmed = trim($var); //trim whitespace from the stored variable // rows to return $limit=10; // check for an empty string and display a message. if ($trimmed == "") { echo "<p>Please enter a search...</p>"; exit; } // check for a search parameter if (!isset($var)) { echo "<p>We dont seem to have a search parameter!</p>"; exit; } //connect to your database ** EDIT REQUIRED HERE ** mysql_connect("localhost","root",""); //(host, username, password) //specify database ** EDIT REQUIRED HERE ** mysql_select_db("school") or die("Unable to select database"); //select which database we're using // Build SQL Query $query = "select * from the_table where 1st_field like \"%$trimmed%\" order by 1st_field"; // EDIT HERE and specify your table and field names for the SQL query $numresults=mysql_query($query); $numrows=mysql_num_rows($numresults); // If we have no results, offer a google search as an alternative if ($numrows == 0) { echo "<h4>Results</h4>"; echo "<p>Sorry, your search: "" . $trimmed . "" returned zero results</p>"; echo "<p><a href=\"http://www.google.com/search?q=" . $trimmed . "\" target=\"_blank\" title=\"Look up " . $trimmed . " on Google\">Click here</a> to try the search on google</p>"; } // next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; } // get results $query .= " limit $s,$limit"; $result = mysql_query($query) or die("Couldn't execute query"); // display what the person searched for echo "<p>You searched for: "" . $var . ""</p>"; // begin to show results set echo "Results"; $count = 1 + $s ; // now you can display the results returned while ($row= mysql_fetch_array($result)) { $title = $row["1st_field"]; echo "$count.) $title" ; $count++ ; } $currPage = (($s/$limit) + 1); //break before paging echo "<br />"; // next we need to do the links to other results if ($s>=1) { // bypass PREV link if s is 0 $prevs=($s-$limit); print " <a href=\"$PHP_SELF?s=$prevs&q=$var\"><< Prev 10</a>  "; } // calculate number of pages needing links $pages=intval($numrows/$limit); // $pages now contains int of pages needed unless there is a remainder from division if ($numrows%$limit) { // has remainder so add one page $pages++; } // check to see if last page if (!((($s+$limit)/$limit)==$pages) && $pages!=1) { // not last page so give NEXT link $news=$s+$limit; echo " <a href=\"$PHP_SELF?s=$news&q=$var\">Next 10 >></a>"; } $a = $s + ($limit) ; if ($a > $numrows) { $a = $numrows ; } $b = $s + 1 ; echo "<p>Showing results $b to $a of $numrows</p>"; ?> its supposed to search my databases i guess.. i need a site searcher if anyone wanna make me post it please.. or post a tut I made a search engine to search my database for specific users ( well I used a tutorial ). I'm not getting any errors atleast when loading the page which is a first for me. However, now I am tackled by something new. When entering the keywords and submitting the search I get: Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. If you think this is a server error, please contact the webmaster. Error 403 127.0.0.1 04/30/07 11:09:21 Apache/2.2.16 (Win32) PHP/5.3.3 Which is odd for me because I am using the same config.php with connection code to connect to the db which I used with all my other pages. And in those pages I have been able to add/delete/edit and display records from the database tables. Does this have something to do with it being a search engine? Here is my code: Code: [Select] <html> <head> </head> <body> <h2>Search</h2> <form name="search" method="post" action="<?=$PHP_SELF?>"> Seach for: <input type="text" name="find" /> in <Select NAME="field"> <Option VALUE="fname">First Name</option> <Option VALUE="sname">Last Name</option> <Option VALUE="sno">Profile</option> </Select> <input type="hidden" name="searching" value="yes" /> <input type="submit" name="search" value="Search" /> </form> </body> </html> <?php //This is only displayed if they have submitted the form $searching ='searching'; if ($searching =="yes") { echo "<h2>Results</h2><p>"; //If they did not enter data then they receive an error if ($find == "") { echo "<p>You forgot to enter a search term"; exit; } // Otherwise connect to database include 'includes/config.php'; include 'includes/functions.php'; connect(); // filtering $find = strtoupper($find); $find = strip_tags($find); $find = trim ($find); // search for term in specified field $data = mysql_query("SELECT * FROM student WHERE upper($field) LIKE'%$find%'"); // display results while($result = mysql_fetch_array( $data )) { echo $result['fname']; echo " "; echo $result['sname']; echo "<br>"; echo $result['sno']; echo "<br>"; echo "<br>"; } //Counts number or results and display message if there we're non $anymatches=mysql_num_rows($data); if ($anymatches == 0) { echo "Sorry, but we can not find an entry to match your query<br><br>"; } //And we remind them what they searched for echo "<b>Searched For:</b> " .$find; } ?> Any ideas? Thanks in advance Hi, Im trying to do a search engine. However, im facing this errors.. Anyone can help.. Error : Notice: Undefined variable: searching in C:\wamp\www\i-document\s.php on line 17 Thankz in advance. Code: [Select] <h2>Search Form</h2> <form name="search" method="post" action="s.php"> Seach for: <input type="text" name="find" /> in <Select NAME="field"> <Option VALUE="file_name">File Name</option> <Option VALUE="year">Year</option> <Option VALUE="downer">Owner</option> < </Select> <input type="hidden" name="searching" value="yes" /> <input type="submit" name="search" value="Search" /> </form> <?php if ($searching =="yes"){ echo "<h3>Search Results</h3><p>"; if ($find == ""){ echo "<p>Please Enter a search term"; exit; } include "config.php"; $find = strtoupper($find); $find = strip_tags($find); $find = trim ($find); $query = mysql_query("SELECT * FROM document WHERE upper($field) LIKE'%$find%'"); while($result = mysql_fetch_array($query)){ echo $result['file_ref']; echo " "; echo $result['file_name']; echo "<br>"; echo $result['owner']; echo "<br>"; echo "<br>"; } $matches=mysql_num_rows($query); if ($matches == 0){ echo "Sorry, we can not find an entry to match your query<br><br>"; } echo "<b>Searched For:</b> " .$find; } ?> I'm working on the following assignment and keep coming up with error messages.
"Warning: require(mysqli_connect_registrar.php): failed to open stream: No such file or directory in /home/students/r/b.richards/public_html/cis231/labs/sectionresults.php on line 3 I've included the code I have and any help would be appreciated. Thank you. Assignment Directions: Introduction This lab will demonstrate how to create a dynamic form that is created from database contents. And then that form will be used to pull results from the database, based on the user's selection.
STEP 1 - Create the Database Connection File In your labs directory, define a mysql_connect.php file for the registrar database (with the student | student credentials).
STEP 2 - Create the Form Define the form as sectionsearch.php. Create a dynamic form with a drop-down menu listing available courses by title. (Note: the courseID will be the value that is posted to the results page.)
Step 3 - Create the Results page Define the results page as sectionresults.php. Present the results of the query for sections (unless there are none—then show an appropriate message). If there are results, use an HTML table (dynamically-generated) to display available sections with the following information: Faculty last name Room number Class meeting day(s) Start time End time The information should be sorted by the faculty member's last name. Note: You will need to consult the structure of the database tables to determine which fields need to be drawn from which tables and how to join the appropriate tables needed for the query. Sectionsearch.php code:
<!doctype html>
<head> <body>
<form id="form1" name="form1" method="post" action="sectionresults.php">
<p>Courses
<p>
</form> mysql_connect.php code:
<!doctype html>
//Set database connection information
//Database connection
//Set the encoding sectionresults.php code:
<?php
$cat = "";
$q = "SELECT lastame, FROM faculty WHERE registrar = $cat ORDER BY lastname ASC"; Getting the following error message: Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in This error occurs when I first navigate to the search page. When I put a search term in the box and click search it works fine and the error is gone. I've been trying to figure this out for days with no luck, any help you can offer would be greatly appreciated. Code: [Select] <?php require('config.php'); ?> <?php $conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die('Could not connect to MySQL database. ' . mysql_error()); mysql_select_db(SQL_DB, $conn); $result = NULL; if (isset($_GET['keywords'])) { $sql = "SELECT id, hostname, ip, clust_name, clust_ip, node_name, ". "node_ip, os, patch " . "FROM serv_main " . "WHERE MATCH (hostname,ip) " . "AGAINST ('" . $_GET['keywords'] . "' IN BOOLEAN MODE) " . "ORDER BY MATCH (hostname,ip) " . "AGAINST ('" . $_GET['keywords'] . "' IN BOOLEAN MODE) DESC"; $result = mysql_query($sql) or die('Could not perform search; ' . mysql_error()); } ?> <html> <body> <form method="get" action="search.php"> <p class="head">Type in the Server name below to search for an SLA</p> <p> <input id="searchkeywords" type="text" name="keywords" <?php if (isset($_GET['keywords'])) { echo ' value="' . htmlspecialchars($_GET['keywords']) . '" '; } ?> > <input id="searchbutton" class="submit" type="submit" value="Search"> </p> <?php echo "<h1>Search Results</h1>\n"; if ($result and !mysql_num_rows($result)) { if (isset($_GET['keywords'])) { $k = $_GET['keywords']; } echo "<p>No SLA for <b><font size=\"6\" color=#990000>" . $k . "</b></font> found.</p>\n"; } else { $bg = ''; //Error occurs right here********************* while ($row = mysql_fetch_array($result)) { //($row['id'], TRUE); $bg = ($bg=='F2F2FF'?'99CCCC':'F2F2FF'); $table = "<table border=\"0\" cellpadding=\"5\">"; $table .= "<tr bgcolor=\"#" . $bg . "\">" . "<td><a href=\"servedit.php?s=" . $row['id'] . "\">" . $row['hostname'] . "</a></td><td>" . $row['ip'] . "</td><td align=\"center\">" . $row['clust_name'] . "</td><td>" . $row['clust_ip'] . "</td><td>" . $row['node_name'] . "</td><td>" . $row['node_ip'] . "</td><td>" . $row['os'] . "</td><td>" . $row['patch'] . "</td></tr>"; } $table .= "</table>"; echo $table; } ?> </form> </body> </html> MOD EDIT: [code] . . . [/code] tags added. I am new to PHP. I have been trying to do some research online for a few days and not getting very far. I feel like I know less now than I did before I started. Here's the story: I've set up a LAMP server that runs a Wiki and AppGini (http://www.bigprof.com/appgini/) - AppGini allows you to "Create web database applications instantly without writing any code" - The only downside we have with it, is it's got it's own set of user accounts. My team all logs in with the default admin account which isn't a big deal but we'd prefer to use LDAP to AD for reasons I won't get into right now. I emailed AppGini support and asked about LDAP integration. Their response was that it's "a little bit of work" and "You can modify the login authentication function to authenticate using LDAP ... please see the example code he http://code.activestate.com/recipes/101525-ldap-authentication/ (needs some modifications to work with AppGini)" I've googled around and found 2 dozen different LDAP PHP samples. I've gotten some of them to work. By work I mean they connect to my domain controller and say "success" I'm not actually logged into anything. So I'm looking for a little help from square one. I need to have a better understanding of how things are supposed to work so I know where I'm supposed to go with all of this. Where do I start? What do I do? What would YOU do? This is the current "index.php" that logs you into the site. Code: [Select] <?php error_reporting(E_ALL ^ E_NOTICE); $d=dirname(__FILE__); include("$d/defaultLang.php"); include("$d/language.php"); include("$d/incCommon.php"); $x->TableTitle=$Translation['homepage']; include("$d/header.php"); if($_GET['signOut']==1){ logOutMember(); } $tablesPerRow=2; $arrTables=getTableList(); ?> <div align="center"><table cellpadding="8"> <?php if($_GET['loginFailed']==1 || $_GET['signIn']==1){ ?> <tr><td colspan="2" align="center"> <?php if($_GET['loginFailed']){ ?> <div class="Error"><?php echo $Translation['login failed']; ?></div> <?php } ?> <form method="post" action="index.php"> <table border="0" cellspacing="1" cellpadding="4" align="center"> <tr> <td colspan="2" class="TableHeader"> <div class="TableTitle"><?php echo $Translation['sign in here']; ?></div> </td> </tr> <tr> <td align="right" class="TableHeader"> <?php echo $Translation['username']; ?> </td> <td align="left" class="TableBody"> <input type="text" name="username" value="" size="20" class="TextBox"> </td> </tr> <tr> <td align="right" class="TableHeader"> <?php echo $Translation['password']; ?> </td> <td align="left" class="TableBody"> <input type="password" name="password" value="" size="20"class="TextBox"> </td> </tr> <tr> <td colspan="2" align="right" class="TableHeader"> <span style="margin: 0 20px;"><input type="checkbox" name="rememberMe" id="rememberMe" value="1"> <label for="rememberMe"><?php echo $Translation['remember me']; ?></label></span> <input type="submit" name="signIn" value="<?php echo $Translation['sign in']; ?>"> </td> </tr> <tr> <td colspan="2" align="left" class="TableHeader"> <?php echo $Translation['go to signup']; ?> <br /><br /> </td> </tr> <tr> <td colspan="2" align="left" class="TableHeader"> <?php echo $Translation['forgot password']; ?> <br /><br /> </td> </tr> <tr> <td colspan="2" align="left" class="TableHeader"> <?php echo $Translation['browse as guest']; ?> <br /><br /> </td> </tr> </table> </form> <script>document.getElementsByName('username')[0].focus();</script> </td></tr> <?php } ?> <?php if(!$_GET['signIn'] && !$_GET['loginFailed']){ if(is_array($arrTables)){ if(getLoggedAdmin()){ ?><tr><td colspan="<?php echo ($tablesPerRow*3-1); ?>" class="TableTitle" style="text-align: center;"><a href="admin/"><img src=table.gif border=0 align="top"></a> <a href="admin/" class="TableTitle" style="color: red;"><?php echo $Translation['admin area']; ?></a><br /><br /></td></tr><?php } $i=0; foreach($arrTables as $tn=>$tc){ $tChk=array_search($tn, array()); if($tChk!==false && $tChk!==null){ $searchFirst='?Filter_x=1'; }else{ $searchFirst=''; } if(!$i % $tablesPerRow){ echo '<tr>'; } ?><td valign="top"><a href=<?php echo $tn; ?>_view.php<?php echo $searchFirst; ?>><img src=<?php echo $tc[2];?> border=0></a></td><td valign="top" align="left"><a href=<?php echo $tn; ?>_view.php<?php echo $searchFirst; ?> class="TableTitle"><?php echo $tc[0]; ?></a><br /><?php echo $tc[1]; ?></td><?php if($i % $tablesPerRow == ($tablesPerRow - 1)){ echo '</tr>'; }else{ echo '<td width="50"> </td>'; } $i++; } }else{ ?><tr><td><div class="Error"><?php echo $Translation['no table access']; ?><script language="javaScript">setInterval("window.location='index.php?signOut=1'", 2000);</script></div></td></tr><?php } } ?> </table><br /><br /><div class="TableFooter"><b><a href=http://bigprof.com/appgini/>BigProf Software</a> - <?php echo $Translation['powered by']; ?> AppGini 4.61</b></div> </div> </html> |