pixeltrace
Members-
Posts
577 -
Joined
-
Last visited
Never
Everything posted by pixeltrace
-
hi, i have a problem, really big, for me my boss gave me a csv file with 6000 rows now i need to upload them to the database. what is the best query to run in phpmyadmin sql query to load this faster? the table has 25 rows but the data that my boss gave me only needs to be inserted to 7 out of the 25 rows only. is there a way to load this faster? thanks!
-
great! thanks so much!!!
-
thanks for all the help guys. i really really appreciate it. effigy you're right, bad boss, she just dump the task to me since our unix administrator resigned without notice and didnt report anymore. anyway, hope everything goes well. thanks again!
-
hi effigy, i dont have a choice here, my boss wants me to handle this. i can learn in the process, i just need to be cautious and be careful on it. do you know any good tutorial sites for unix as well as for ssh? thanks!
-
i see. so that is its purpose. is there a free script online for this? or do you now the code for this? hope you could help me with this. thanks!
-
guys, my boss wanted to setup a registration form and has the security ramdon text below. this is the part, where before you submit the registration form, you have to type in correctly the random text/numbers that was generated. hope you are getting what i mean. what is this called and what is the purpose of that? also, do we have an online code of that which i can just use? because i still dont have an idea how it works and how to do it. hope you could help me with this. thanks so much!
-
hi, thanks for all the inputs. i havent tried ssh yet, but my friend told me its something like an application for you to acess linux via windows. i can try to study and learn this but do you have some tutorials or sites where i can find tutorials on ssh and the command list for web management? thanks so much!
-
sorry about the double post, because i just dont know if i am on the right board, that's why i also posted in apache section. putty? how does this work? is this something like ftp? aside from this, are there any other software to use? thanks!
-
hi, i dont know if i am on the right board but i honestly dont know anything about linux yet. i am currently managing a web site and it is setup in a linux server and site can be access via sftp ssh. my client gave me a root access and he gave me the password for that. my question is, how can i access the root having only the password. what application or software will i use to do this? currently i can only access the site via ftp client and i have a username/password for that. hope you can help me with this. thanks!
-
guys, i need help. i have 2 different domains which needs to use the user account, or cookie. let say i login to www.domain.com and then i go to www.domain-2.com. when i go to domain-2.com if i am already logged in to domain.com i will automatically be logged in to domain-2.com and vice -versa. is this possible? if so, what will the code be and how to do it? thanks!
-
[SOLVED] how to view items in alphabetical order
pixeltrace replied to pixeltrace's topic in PHP Coding Help
its working now. thanks! -
[SOLVED] how to view items in alphabetical order
pixeltrace replied to pixeltrace's topic in PHP Coding Help
its still the same. the items are viewed this way z a testing1 test testing its still not working. how do i fix this? -
guys, i need help, how can i view items in my database in alphabetical order? SELECT COUNT(*) FROM #__brand_name ORDER by cat_name DESC i tried this one but its not working. hope you could help me with this. thanks!
-
hi mjdamato, what will the codes be? as well as for the client side? i agree with you on the javascript and i think your ideas is better but i honestly dont know how to implement it. hope you could help me with it. thanks!
-
yes, the error() is calling out the msg function (i think) from the validate.php this is the code for the validate.php <?php function error($msg) { ?> <script language="JavaScript"> <!-- alert("<?php echo ($msg) ?> "); history.back(); --> </script> <?php exit; } ?> do you think we can just add here the javascript code that you gave me? if ever that will be the case, whats the proper way to do it? thanks!
-
hi, i tried the email codes that you used but its still not accepting emails with "+" in the username how will i do this correctly? sorry i am not yet very familair with functions. hope you could help me with it. below is my codes for the contactus.php page <!-- codes for the processing of the form --> <?php if (isset($_POST['Submit'])) { include("validate.php"); $name = $_POST['name']; $email = $_POST['email']; $contact = $_POST['contact']; $subject = $_POST['subject']; $message = $_POST['message']; $recipient = $_POST['recipient']; $cc = $_POST['cc']; if ($name=='' or $email=='' or $contact=='') { error ('Some required fields are blank.\\n'. 'Please fill them in and try again.'); } if (!eregi("/^([\w\+-])+([\.]?[\w\+-])*@[a-zA-Z0-9]+([\.-]?[a-zA-Z0-9])*\.([a-zA-Z]{2,4})$/", $email)){ error("Invalid e-mail address"); } $Message = ""; $Message .= "A General Inquiry from: $name\n"; $Message .= "Contact Number: $contact\n"; $Message .= "Email Address: $email\n"; $ip = getenv("REMOTE_ADDR"); $Message .="IP address:".$ip."\n"; $Message .= "\n\n"; $Message .= "Message:\n"; $Message .= "$message\n"; $Message .= "\n\n"; $Header = $email; $To = "$recipient, $cc"; $Subject = "Phenom D-signs General Inquiry"; // mail($To,$Subject,$Message,"From: $Header","-f $EmailAdd"); last parameter might not be supported mail($To,$Subject,$Message,"From: $Header"); echo '<script language=javascript> alert("Your inquiry has been sent!");top.location = "main.php?url=contactus.php";</script>'; } ?> <!-- end --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- body { background-color: #6d6e71; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="css.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="480" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3"> </td> </tr> <tr> <td width="36" align="right"> </td> <td colspan="2" class="title1"> <img src="images/dot.gif" width="16" height="13" /> CONTACT US </td> </tr> <tr> <td rowspan="3"> </td> <td colspan="2" valign="top"><img src="images/spacer.gif" width="1" height="10" /></td> </tr> <tr> <td colspan="2" bgcolor="05a4dd"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="2" valign="top"><img src="images/spacer.gif" width="1" height="10" /></td> </tr> <tr> <td rowspan="12"> </td> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br></td> <td width="428" class="text1"><span class="text2"> Company Office Address </span>:</td> </tr> <tr> <td colspan="2" align="right" valign="top" class="text1"><img src="images/spacer.gif" width="1" height="6" /></td> </tr> <tr> <td width="16" align="right" valign="top" class="text1"> </td> <td valign="top" class="text1"> <span class="title2"><i>Phenom D-signs Pte Ltd</i></span> <br /> No.8 Boon Lay Way #08-06<br> 8@Trade Hub 21 Singapore 609964 </td> </tr> <tr> <td colspan="2" align="right" valign="top" class="text1"> </td> </tr> <tr> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br /></td> <td valign="top" class="text1"> <span class="text2">Telephone Number :</span> +65 6615 5038 </td> </tr> <tr> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br /></td> <td valign="top" class="text1"> <span class="text2">Fax Number :</span> +65 6316 1976 </td> </tr> <tr> <td colspan="2" align="right" valign="top" class="text1"><img src="images/spacer.gif" width="1" height="10" /></td> </tr> <tr> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br /></td> <td valign="top" class="text1"> <span class="text2">Email Address :</span> adrian(@)phenomd-signs.com.sg </td> </tr> <tr> <td colspan="2" align="right" valign="top" class="text1"> </td> </tr> <tr> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br /></td> <td valign="top" class="text2"> <span class="title2">General Inquiry Form</span> </td> </tr> <tr> <td width="16" align="right" valign="top" class="text1"> </td> <td valign="top" class="text1"><form action="" method="post"><table width="382" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="10" rowspan="7"><img src="images/spacer.gif" width="10" height="1" /></td> <td width="110" valign="top"><img src="images/spacer.gif" width="1" height="6"></td> <td width="6" rowspan="7"><img src="images/spacer.gif" width="6" height="1" /></td> <td colspan="2" valign="top"><img src="images/spacer.gif" width="1" height="6"></td> </tr> <tr> <td align="right" class="text2">name : </td> <td width="177" valign="top"><input name="name" type="text" class="field1" size="35" /></td> <td width="67" valign="top"> <span class="text3">*</span></td> </tr> <tr> <td align="right" class="text2">email address : </td> <td valign="top"><input name="email" type="text" class="field1" size="35" /></td> <td valign="top"> <span class="text3">*</span></td> </tr> <tr> <td align="right" class="text2">contact no. : </td> <td valign="top"><input name="contact" type="text" class="field1" size="35" /></td> <td valign="top"> <span class="text3">*</span></td> </tr> <tr> <td align="right" valign="top" class="text2">message : </td> <td colspan="2"><textarea name="message" cols="36" rows="5" class="field2"></textarea></td> </tr> <tr> <td> </td> <td colspan="2"><input name="Submit" type="submit" value="Send" /> <input type="hidden" name="recipient" value="pixeltrace@gmail.com" /> <input type="hidden" name="cc" value="pixeltrace@gmail.com" /> <input type=hidden value=http://www. name=redirect></td> </tr> </table> </form></td> </tr> <tr> <td colspan="2"> </td> </tr> </table> </body> </html> thanks!
-
Hi, Thanks for the reply. Do you have better ideas on how to solve this? where will i place the javascript? what codes will i add so the "+" in the username can be allowed? hope you could share me the codes. thanks!
-
guys, i need help, i created a 1 page sendmail form and this form is inside an iframe. everything is working fine, i can fill up the form, send and i can receive my test email however after sending the email, it should normally return to its original page. its returning to its original page but the css style, placement of the form field, text is different. here is the page http://www.jobhirings.com/pd/main.php then click on the contact us button and try sending a test email to see what i mean. this is the code of my contactus.php page <!-- codes for the processing of the form --> <?php if (isset($_POST['Submit'])) { include("validate.php"); $name = $_POST['name']; $email = $_POST['email']; $contact = $_POST['contact']; $subject = $_POST['subject']; $message = $_POST['message']; $recipient = $_POST['recipient']; $cc = $_POST['cc']; if ($name=='' or $email=='' or $contact=='') { error ('Some required fields are blank.\\n'. 'Please fill them in and try again.'); } if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email)){ error("Invalid e-mail address"); } $Message = ""; $Message .= "A General Inquiry from: $name\n"; $Message .= "Contact Number: $contact\n"; $Message .= "Email Address: $email\n"; $ip = getenv("REMOTE_ADDR"); $Message .="IP address:".$ip."\n"; $Message .= "\n\n"; $Message .= "Message:\n"; $Message .= "$message\n"; $Message .= "\n\n"; $Header = $email; $To = "$recipient, $cc"; $Subject = "Phenom D-signs General Inquiry"; // mail($To,$Subject,$Message,"From: $Header","-f $EmailAdd"); last parameter might not be supported mail($To,$Subject,$Message,"From: $Header"); echo '<script language=javascript> alert("Your inquiry has been sent!");window.location = "contactus.php";</script>'; } ?> <!-- end --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- body { background-color: #6d6e71; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="css.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="480" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3"> </td> </tr> <tr> <td width="36" align="right"> </td> <td colspan="2" class="title1"> <img src="images/dot.gif" width="16" height="13" /> CONTACT US </td> </tr> <tr> <td rowspan="3"> </td> <td colspan="2" valign="top"><img src="images/spacer.gif" width="1" height="10" /></td> </tr> <tr> <td colspan="2" bgcolor="05a4dd"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="2" valign="top"><img src="images/spacer.gif" width="1" height="10" /></td> </tr> <tr> <td rowspan="12"> </td> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br></td> <td width="428" class="text1"><span class="text2"> Company Office Address </span>:</td> </tr> <tr> <td colspan="2" align="right" valign="top" class="text1"><img src="images/spacer.gif" width="1" height="6" /></td> </tr> <tr> <td width="16" align="right" valign="top" class="text1"> </td> <td valign="top" class="text1"> <span class="title2"><i>Phenom D-signs Pte Ltd</i></span> <br /> No.8 Boon Lay Way #08-06<br> 8@Trade Hub 21 Singapore 609964 </td> </tr> <tr> <td colspan="2" align="right" valign="top" class="text1"> </td> </tr> <tr> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br /></td> <td valign="top" class="text1"> <span class="text2">Telephone Number :</span> +65 6615 5038 </td> </tr> <tr> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br /></td> <td valign="top" class="text1"> <span class="text2">Fax Number :</span> +65 6316 1976 </td> </tr> <tr> <td colspan="2" align="right" valign="top" class="text1"> </td> </tr> <tr> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br /></td> <td valign="top" class="text1"> <span class="text2">Email Address :</span> adrian(@)phenomd-signs.com.sg </td> </tr> <tr> <td colspan="2" align="right" valign="top" class="text1"> </td> </tr> <tr> <td width="16" align="right" class="text1"><img src="images/arrow.png" width="10" height="9" /><br /></td> <td valign="top" class="text2"> <span class="title2">General Inquiry Form</span> </td> </tr> <tr> <td width="16" align="right" valign="top" class="text1"> </td> <td valign="top" class="text1"><form action="" method="post"><table width="382" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="10" rowspan="7"><img src="images/spacer.gif" width="10" height="1" /></td> <td width="110" valign="top"><img src="images/spacer.gif" width="1" height="6"></td> <td width="6" rowspan="7"><img src="images/spacer.gif" width="6" height="1" /></td> <td colspan="2" valign="top"><img src="images/spacer.gif" width="1" height="6"></td> </tr> <tr> <td align="right" class="text2">name : </td> <td width="177" valign="top"><input name="name" type="text" class="field1" size="35" /></td> <td width="67" valign="top"> <span class="text3">*</span></td> </tr> <tr> <td align="right" class="text2">email address : </td> <td valign="top"><input name="email" type="text" class="field1" size="35" /></td> <td valign="top"> <span class="text3">*</span></td> </tr> <tr> <td align="right" class="text2">contact no. : </td> <td valign="top"><input name="contact" type="text" class="field1" size="35" /></td> <td valign="top"> <span class="text3">*</span></td> </tr> <tr> <td align="right" valign="top" class="text2">message : </td> <td colspan="2"><textarea name="message" cols="36" rows="5" class="field2"></textarea></td> </tr> <tr> <td> </td> <td colspan="2"><input name="Submit" type="submit" value="Send" /> <input type="hidden" name="recipient" value="adrian@phenomd-signs.com.sg" /> <input type="hidden" name="cc" value="pixeltrace@gmail.com" /> <input type=hidden value=http://www. name=redirect></td> </tr> </table> </form></td> </tr> <tr> <td colspan="2"> </td> </tr> </table> </body> </html> hope you could help me with this. thanks so much!
-
guys, i need help i dont know what this error means and evenmore, i cannot trace the code to modify to fix this Parse error: parse error, unexpected ';', expecting T_FUNCTION in /var/www/html/memoryworld/administrator/components/com_brandname/admin.brandname.html.php on line 62 this is the code of my page admin.brandname.html.php <? defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); class HTML_BrandName { function showBrandNames( &$rows, &$pageNav, $option ) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <th width="3" align="center" class="title"> </th> <th width="21" align="center" class="title">#</th> <th width="20" align="center"><span class="title"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /> </span></th> <th width="28" align="center" class="title"> </th> <th width="245" class="title">Brand Name</th> <th width="271" align="center" class="title"> </th> <th width="74" align="center">Published</th> <th width="138" colspan="2">Reorder</th> <th width="38" align="center">ID</th> <th width="84"> </th> </tr> <?php $k = 0; for ($i=0, $n=count($rows); $i < $n; $i++) { $row = $rows[$i]; mosMakeHtmlSafe($row); $link = 'index2.php?option=com_brandname&task=editA&hidemainmenu=1&id='. $row->id; $img = $row->published ? 'tick.png' : 'publish_x.png'; $task = $row->published ? 'unpublish' : 'publish'; $alt = $row->published ? 'Published' : 'Unpublished'; //$checked = mosCommonHTML::CheckedOutProcessing( $row, $i ); //$row->cat_link = 'index2.php?option=com_categories§ion=com_contact_details&task=editA&hidemainmenu=1&id='. $row->catid; //$row->user_link = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id='. $row->user_id; ?> <tr class="<?php echo "row$k"; ?>"> <td width="3" align="center"> </td> <td width="21" align="center"><?php echo $pageNav->rowNumber( $i ); ?></td> <td width="20" align="center"><?php echo $checked; ?></td> <td width="28" align="center"> </td> <td width="245"><a href="#edit" onclick="return listItemTask('cb<?php echo $i;?>','edit')"><?php echo $row->name; ?></a></td> <td width="271" align="center"> </td> <td width="74" align="center"><a href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i;?>','<?php echo $task;?>')"><img src="images/<?php echo $img;?>" width="12" height="12" border="0" alt="<?php echo $alt; ?>" /></a></td> <td width="69" align="center"><?php echo $pageNav->orderUpIcon( $i, ( $row->id == @$rows[$i-1]->id ) ); ?></td> <td width="69" align="center"><?php echo $pageNav->orderDownIcon( $i, $n, ( $row->id == @$rows[$i+1]->id ) ); ?></td> <td width="38" align="center"><?php echo $row->id; ?></td> <td width="84" align="center"> </td> <?php $k = 1 - $k; } ?> </tr> <?php } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="<?php echo $option; ?>" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0"> </form> <? { function editBrandName( &$row, &$lists, $option ) { global $mosConfig_live_site; mosMakeHtmlSafe( $row, ENT_QUOTES ); ?> <script language="javascript" type="text/javascript"> <!-- function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } // do field validation if ( form.name.value == "" ) { alert( "You must provide a brand name." ); } else { submitform( pressbutton ); } } //--> </script> <form action="index2.php" method="post" name="adminForm" id="adminForm" class="adminForm"> <table class="adminheading"> <tr> <th> Brand: <small> <?php echo $row->id ? 'Edit' : 'New';?> </small> </th> </tr> </table> <table> <tr> <td align="right">Brand Name : </td> <td><input class="inputbox" type="text" name="name" size="50" maxlength="100" value="<?php echo $row->name; ?>" /></td> </tr> <tr> <td align="right">Published : </td> <td><?php echo $lists['published']; ?></td> </tr> <tr> <td align="right">Ordering : </td> <td><?php echo $lists['ordering']; ?></td> </tr> </table> <script language="Javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script> <input type="hidden" name="id" value="<?php echo $row->id; ?>" /> <input type="hidden" name="option" value="<?php echo $option; ?>" /> <input type="hidden" name="task" value="" /> </form> <?php } } ?> and this is the code of the other related page admin.brandname.php <?php defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); // ensure user has access to this function if (!($acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'all' ) | $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_brandname' ))) { mosRedirect( 'index2.php', _NOT_AUTH ); } require_once( $mainframe->getPath( 'admin_html' ) ); require_once( $mainframe->getPath( 'class' ) ); $cid = josGetArrayInts( 'cid' ); switch ($task) { case 'new': editBrandName( '0', $option); break; case 'edit': editBrandName( intval( $cid[0] ), $option ); break; case 'editA': editBrandName( $id, $option ); break; case 'save': saveBrandName( $option ); break; case 'remove': removeBrandNames( $cid, $option ); break; case 'publish': changeBrandName( $cid, 1, $option ); break; case 'unpublish': changeBrandName( $cid, 0, $option ); break; case 'orderup': orderBrandNames( intval( $cid[0] ), -1, $option ); break; case 'orderdown': orderBrandNames( intval( $cid[0] ), 1, $option ); break; case 'cancel': cancelBrandName(); break; default: showBrandNames( $option ); break; } /** * List the records * @param string The current GET/POST option */ function showBrandNames( $option ) { global $database, $mainframe, $mosConfig_list_limit; $id = intval( $mainframe->getUserStateFromRequest( "id{$option}", 'id', 0 ) ); $limit = intval( $mainframe->getUserStateFromRequest( "viewlistlimit", 'limit', $mosConfig_list_limit ) ); $limitstart = intval( $mainframe->getUserStateFromRequest( "view{$option}limitstart", 'limitstart', 0 ) ); if ( $id ) { $where[] = "cd.id = " . (int) $id; } if ( isset( $where ) ) { $where = "\n WHERE ". implode( ' AND ', $where ); } else { $where = ''; } // get the total number of records $query = "SELECT COUNT(*)" . "\n FROM #__brandname AS cd" . $where ; $database->setQuery( $query ); $total = $database->loadResult(); require_once( $GLOBALS['mosConfig_absolute_path'] . '/administrator/includes/pageNavigation.php' ); $pageNav = new mosPageNav( $total, $limitstart, $limit ); // get the subset (based on limits) of required records $query = "SELECT cd.*" . "\n FROM #__brandname AS cd" . $where . "\n ORDER BY cd.id, cd.ordering, cd.name ASC" ; $database->setQuery( $query, $pageNav->limitstart, $pageNav->limit ); $rows = $database->loadObjectList(); // build list of categories //$javascript = 'onchange="document.adminForm.submit();"'; //$lists['catid'] = mosAdminMenus::ComponentCategory( 'catid', 'com_contact_details', intval( $catid ), $javascript ); HTML_BrandName::showBrandNames( $rows, $pageNav, $option ); } /** * Creates a new or edits and existing user record * @param int The id of the record, 0 if a new entry * @param string The current GET/POST option */ function editBrandName( $id, $option ) { global $database, $my; global $mosConfig_absolute_path; $row = new mosBrandName( $database ); // load the row from the db table $row->load( (int)$id ); if ($id) { // do stuff for existing records $row->checkout($my->id); } else { // do stuff for new records $row->ordering = 0; $row->published = 1; } $lists = array(); // build the html select list for ordering $query = "SELECT ordering AS value, name AS text" . "\n FROM #__brandname" . "\n WHERE published >= 0" . "\n AND id = " . (int) $row->id . "\n ORDER BY ordering" ; // build list of ordering $lists['ordering'] = mosAdminMenus::SpecificOrdering( $row, $id, $query, 1 ); // build the html radio buttons for published $lists['published'] = mosHTML::yesnoradioList( 'published', '', $row->published ); // build the html radio buttons for default $lists['default_con'] = mosHTML::yesnoradioList( 'default_con', '', $row->default_con ); HTML_BrandName::editBrandName( $row, $lists, $option ); } /** * Saves the record from an edit form submit * @param string The current GET/POST option */ function saveBrandName( $option ) { global $database; $row = new mosBrandName( $database ); if (!$row->bind( $_POST )) { echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n"; exit(); } // pre-save checks if (!$row->check()) { echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n"; exit(); } // save the changes if (!$row->store()) { echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n"; exit(); } $row->checkin(); $row->updateOrder(); if ($row->default_con) { $query = "UPDATE #__brandname" . "\n SET default_con = 0" . "\n WHERE id != " . (int) $row->id . "\n AND default_con = 1" ; $database->setQuery( $query ); $database->query(); } mosRedirect( "index2.php?option=$option" ); } /** * Removes records * @param array An array of id keys to remove * @param string The current GET/POST option */ function removeBrandNames( &$cid, $option ) { global $database; if (count( $cid )) { mosArrayToInts( $cid ); $cids = 'id=' . implode( ' OR id=', $cid ); $query = "DELETE FROM #__brandname" . "\n WHERE ( $cids )" ; $database->setQuery( $query ); if (!$database->query()) { echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n"; } } mosRedirect( "index2.php?option=$option" ); } /** * Changes the state of one or more content pages * @param array An array of unique category id numbers * @param integer 0 if unpublishing, 1 if publishing * @param string The current option */ function changeBrandName( $cid=null, $state=0, $option ) { global $database, $my; if (!is_array( $cid ) || count( $cid ) < 1) { $action = $publish ? 'publish' : 'unpublish'; echo "<script> alert('Select an item to $action'); window.history.go(-1);</script>\n"; exit(); } mosArrayToInts( $cid ); $cids = 'id=' . implode( ' OR id=', $cid ); $query = "UPDATE #__brandname" . "\n SET published = " . (int) $state . "\n WHERE ( $cids )" //. "\n AND ( checked_out = 0 OR ( checked_out = " . (int) $my->id . ") )" ; $database->setQuery( $query ); if (!$database->query()) { echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n"; exit(); } if (count( $cid ) == 1) { $row = new mosBrandName( $database ); $row->checkin( intval( $cid[0] ) ); } mosRedirect( "index2.php?option=$option" ); } /** JJC * Moves the order of a record * @param integer The increment to reorder by */ function orderBrandNames( $uid, $inc, $option ) { global $database; $row = new mosBrandName( $database ); $row->load( (int)$uid ); $row->updateOrder(); $row->move( $inc, "published >= 0" ); $row->updateOrder(); mosRedirect( "index2.php?option=$option" ); } /** PT * Cancels editing and checks in the record */ function cancelBrandName() { global $database; $row = new mosBrandName( $database ); $row->bind( $_POST ); $row->checkin(); mosRedirect('index2.php?option=com_brandname'); } ?> hope you could help me with this. thanks so much!
-
guys, i need help, i an currently modifying a php page in joomla and i am getting this error on the admin.brandname.html.php page Warning: Missing argument 3 for HTML_BrandName::edit() in /var/www/html/memoryworld/administrator/components/com_brandname/admin.brandname.html.php on line 6 sorry i am not yet that good in reading php codes. hope you could help me with this this is the code for my admin.brandname.html.php page <? defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); class HTML_BrandName{ function edit( $option, &$lists, &$row) { ?> <form action="index2.php" method="post" name="adminForm" id="adminForm" class="adminForm"> <table border="0" cellpadding="3" cellspacing="0"> <tr> <td>Brand Name: </td> <td><input type="text" size="50" maxsize="100" name="bname" value="<?php echo $row->bname; ?>" /></td> </tr> <tr> <td>Ordering: </td> <td><?php echo $lists['ordering']; ?></td> </tr> <tr> <td>Published: </td> <td><? echo mosHTML::yesnoSelectList( "published", "", $row->published ); ?></td> </tr> </table> <input type="hidden" name="id" value="<?php echo $row->id; ?>" /> <input type="hidden" name="option" value="<?php echo $option; ?>" /> <input type="hidden" name="task" value="" /> </form> <? } function listConfiguration($option, &$rows) { ?> <form action="index2.php" method="post" name="adminForm"> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <? $row = $rows[0]; ?> <tr><td>Bold</td><td><? echo mosHTML::yesnoSelectList( "bold", "", $row->bold ); ?></td></tr> <tr><td>Italic</td><td><? echo mosHTML::yesnoSelectList( "italic", "", $row->italic ); ?></td></tr> <tr><td>Underline</td><td><? echo mosHTML::yesnoSelectList( "underline", "", $row->underline ); ?></td></tr> <tr><td>Show Date</td><td><? echo mosHTML::yesnoSelectList( "showdate", "", $row->showdate ); ?></td></tr> </table> <input type="hidden" name="option" value="<?php echo $option; ?>" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="configid" value=<? echo $row->configid ?> /> <input type="hidden" name="act" value="configure" /> </form> <? } function listMessages( $option, &$pageNav, &$rows) { ?> <form action="index2.php" method="post" name="adminForm"> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <th width="8" align="center" class="title"> </th> <th width="21" align="center" class="title">#</th> <th width="20" align="center"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /></th> <th width="28" align="center" class="title"> </th> <th width="245" class="title">Brand Name</th> <th width="217" align="center" class="title"> </th> <th width="97" align="center">Published</th> <th colspan="2">Reorder</th> <th width="40" align="center">ID</th> <th width="84"> </th> </tr> <?php $k = 0; for ($i=0, $n=count( $rows ); $i < $n; $i++) { $row = &$rows[$i]; if ($row->ordering !=NULL) { $img = 'tick.png' ; //$task = _EC_EXCLUDE . _EC_TASK_ARTICLE; } else { $img = 'publish_x.png'; //$task = _EC_INCLUDE . _EC_TASK_ARTICLE;; } ?> <tr class="<?php echo "row$k"; ?>"> <td width="8" align="center"> </td> <td width="21" align="center"><?=$i+$pageNav->limitstart+1;?></td> <td width="20" align="center"><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->id; ?>" onclick="isChecked(this.checked);" /></td> <td width="28" align="center"> </td> <td width="245"><a href="#edit" onclick="return listItemTask('cb<?php echo $i;?>','edit')"><?php echo $row->bname; ?></a></td> <td width="217" align="center"> </td> <td width="97" align="center"><?php if ($row->published == "1") { echo "<a href=\"javascript: void(0);\" onClick=\"return listItemTask('cb$i','unpublish')\"><img src=\"images/publish_g.png\" border=\"0\" /></a>"; } else { echo "<a href=\"javascript: void(0);\" onClick=\"return listItemTask('cb$i','publish')\"><img src=\"images/publish_x.png\" border=\"0\" /></a>"; } ?></td> <td width="78" align="center"><?php if ($i > 0) { ?> <a href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i; ?>','orderup')"><img src="images/uparrow.png" border="0" /></a> <?php } // if ?></td> <td width="76" align="center"><?php if ($i < count($rows)-1) { ?> <a href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i; ?>','orderdown')"><img src="images/downarrow.png" border="0" /></a> <?php } // if ?></td> <td width="40" align="center"><?php echo $row->id; ?></td> <td width="84" align="center"> </td> <?php $k = 1 - $k; ?> </tr> <?php } ?> </table> <input type="hidden" name="option" value="<?php echo $option; ?>" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> </form> <? } } ?> and this is the code for my admin.brandname.php page <?php defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); // ensure user has access to this function if (!($acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'all' ) | $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_brandname' ))) { mosRedirect( 'index2.php', _NOT_AUTH ); } require_once( $mainframe->getPath( 'admin_html' ) ); require_once( $mainframe->getPath( 'class' ) ); $id = mosGetParam( $_REQUEST, 'cid', array(0) ); if (!is_array( $id )) { $id = array(0); } switch($act) { case "configure": switch($task) { case "save": saveConfiguration($option); break; default: listConfiguration($option); break; } break; default: switch ($task) { case "save" : save($option); break; case "edit" : edit( $option, $id ); break; case "new" : $id = ''; edit( $option, $id); break; case "delete" : del($option, $id); break; case "publish" : publishMessage($option, '1', $id); break; case "unpublish" : publishMessage($option, '0', $id); break; case 'orderup': orderMessage( $option,$cid, -1 ); break; case 'orderdown': orderMessage( $option,$cid, 1 ); break; case "listMessages" : default: listMessages($option); break; } break; } function saveConfiguration($option) { global $database; $row = new BrandNameConf($database); // bind it to the table if (!$row -> bind($_POST)) { echo "<script> alert('" .$row -> getError() ."'); window.history.go(-1); </script>\n"; exit(); } // store it in the db if (!$row -> store()) { echo "<script> alert('" .$row -> getError() ."'); window.history.go(-1); </script>\n"; exit(); } mosRedirect("index2.php?option=$option&act=configure", "Configuration Saved"); } function listConfiguration($option) { global $database; $database->setQuery("SELECT * FROM #__brandname_conf" ); $rows = $database -> loadObjectList(); if ($database -> getErrorNum()) { echo $database -> stderr(); return false; } HTML_BrandName::listConfiguration($option, $rows); } function publishMessage( $option, $publish=1 ,$cid ) { global $database, $my; if (!is_array( $cid ) || count( $cid ) < 1) { $action = $publish ? 'publish' : 'unpublish'; echo "<script> alert('Select an item to $action'); window.history.go(-1);</script>\n"; exit; } $cids = implode( ',', $cid ); $database->setQuery( "UPDATE #__brandname SET published='$publish'" . "\nWHERE id IN ($cids)" // AND (checked_out=0 OR (checked_out='$my->id') ); if (!$database->query()) { echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n"; exit(); } mosRedirect( "index2.php?option=$option" ); } function save($option) { global $database; $row = new BrandName($database); // bind it to the table if (!$row -> bind($_POST)) { echo "<script> alert('" .$row -> getError() ."'); window.history.go(-1); </script>\n"; exit(); } // store it in the db if (!$row -> store()) { echo "<script> alert('" .$row -> getError() ."'); window.history.go(-1); </script>\n"; exit(); } mosRedirect("index2.php?option=$option", "Saved"); } function del($option, $cid) { global $database; if (!is_array($cid) || count($cid) < 1) { echo "<script> alert('Select an item to delete'); window.history.go(-1);</script>\n"; exit(); } if (count($cid)) { $ids = implode(',', $cid); $database->setQuery("DELETE FROM #__brandname \nWHERE id IN ($ids)"); } if (!$database->query()) { echo "<script> alert('" .$database -> getErrorMsg() ."'); window.history.go(-1); </script>\n"; } mosRedirect("index2.php?option=$option"); } function edit($option, $id) { global $database, $my, $mosConfig_absolute_path; $row = new BrandName( $database ); // load the row from the db table $row->load( (int)$id ); if($id){ $row -> load($id[0]); } else { // initialise new record $row->published = 1; $row->order = 0; } // build the html select list for ordering $query = "SELECT ordering AS value" . "\n FROM #__brandname" . "\n WHERE id = " . (int) $row->id . "\n ORDER BY ordering" ; $lists['ordering'] = mosAdminMenus::SpecificOrdering( $row, $id, $query, 1 ); HTML_BrandName::edit($option, $row); } function listMessages($option) { global $database, $mainframe; $limit = $mainframe->getUserStateFromRequest( "viewlistlimit", 'limit', 10 ); $limitstart = $mainframe->getUserStateFromRequest( "viewban{$option}limitstart", 'limitstart', 0 ); // get the total number of records $database->setQuery( "SELECT count(*) FROM #__brandname"); $total = $database->loadResult(); echo $database->getErrorMsg(); require_once("includes/pageNavigation.php"); $pageNav = new mosPageNav( $total, $limitstart, $limit ); $database->setQuery( "SELECT id, ordering, bname " . "\nFROM #__brandname" . "\nORDER BY ordering ASC" . "\nLIMIT $limitstart, $limit" ); $rows = $database->loadObjectList(); if(!$result = $database->query()) { echo $database->stderr(); return false; } HTML_BrandName::listMessages($option, $pageNav, $rows); } /** * Moves the order of a record * @param integer The increment to reorder by */ function orderMessage($option, $uid, $inc ) { global $database; mylog($uid[0]); $row = new BrandName( $database ); $row->load( $uid[0] ); mylog($row->ordering); $row->move( $inc, "" ); mosRedirect( "index2.php?option=$option"); } ?> hope you could help me with this. thanks!
-
its actually wierd, because i have to pages with a reset password page. the 1st one is not working and its getting this error, while the 2nd one its working fine and dont have the error. this is the code of my 1st page <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>:: JobHiRings - Forgot Password ::</title> <style type="text/css"> <!-- body { background-image: url(images/main/bg.gif); } --> </style> <link href="css.css" rel="stylesheet" type="text/css"> </head> <body> <table width="776" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="776" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top"><img src="images/main/top.gif" width="776" height="6"></td> </tr> <tr> <td width="6" align="left" valign="top" background="images/main/left.gif"><img src="images/main/left.gif" width="6" height="14"></td> <td width="764" bgcolor="#FFFFFF"><table width="764" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="764" height="346"> <param name="movie" value="flash/main.swf"> <param name="quality" value="high"> <embed src="flash/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="764" height="346"></embed> </object></td> </tr> <tr> <td height="62" align="left" valign="top" bgcolor="#FFFFFF"><table width="764" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="181" valign="top" background="images/main/bgbar.gif"><img src="images/main/bgbar.gif" height="50"></td> <td width="344" valign="top" background="images/main/bgbar.gif"> </td> <td width="239" background="images/main/bgbar.gif"> </td> </tr> <tr> <td colspan="3" align="center" valign="top"><br><table width="416" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#B30110"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="left" bgcolor="#B30110" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> <td width="414" align="center"><br> <h1 class="text7">Forgot Password</h1> <span class="text8">You can reset your password here and send a copy to your email address.<br> Simply enter your email address below to have your password reset.</span><br> <br> <?php include 'admean/db_connect.php'; $query="SELECT email, password FROM applicant where email='$email'"; $result=mysql_query($query); while($rec=mysql_fetch_assoc($result)){ $mail=$_POST['email']=$rec['email']; } if(mysql_num_rows($result)==1){ $password2 = $password; $password1=md5($password); if($_GET['cmd']=="update"){ $query2="UPDATE applicant set `password`='$password1' where `email` = '$email' "; $result=mysql_query($query2)or die(mysql_error()); $Message = ""; $Message .= "Hello\n"; $Message .= "This is a password change request\n"; $Message .= "that you made from JobHiRings\n"; $Message .= "\n\n"; $Message .= "please keep this new password in a safe place\n"; $Message .= "----------------------------\n"; $Message .="Your new password is:" .$password2."\n"; $Message .= "\n\n"; $Header = "postmaster@jobhirings.com"; $To = "$email"; $Subject = "Your New Password"; mail($To,$Subject,$Message,"From: $Header"); echo " <div align='center'><b class='text3'>Thank you password changed!<br> We have sent a copy to your email address!<div></b><br><br><a href='employer.php' class='link2'>Please try to login now</a><br><br></td> <td align='right' bgcolor='#B30110' width='1'><img src='images/main/spacer.gif' width='1' height='1' /></td> </tr><tr> <td colspan='3' valign='top' bgcolor='#B30110'><img src='images/main/spacer.gif' width='1' height='1' /></td> </tr></table><br></td></tr></table></td></tr><tr> <td colspan='2' valign='top' style='background:url(images/main/footer.gif); background-repeat:no-repeat'>"; ?> <? include 'footer.php'; ?> <? echo "</td></tr></table></td> <td width='6' background='images/main/right.gif' align='right'><img src='images/main/right.gif' width='6' height='3'></td> </tr><tr> <td colspan='3' valign='bottom'><img src='images/main/bottom.gif' width='776' height='8'></td> </tr></table></td></tr></table></body></html>"; exit; } if($_GET['cmd']=="pro"){ echo"<div><form action='forgotpass.php?cmd=update ' method='POST'> <b class='text3'>Please provide a new password</b><br><br> <input type='password' name='password' maxlength='30'> <br> <br> <input type='submit' value='New Password' class='button1'> </form><br></td> <td align='right' bgcolor='#B30110' width='1'><img src='images/main/spacer.gif' width='1' height='1' /></td> </tr><tr> <td colspan='3' valign='top' bgcolor='#B30110'><img src='images/main/spacer.gif' width='1' height='1' /></td> </tr></table><br></td></tr></table></td></tr><tr> <td colspan='2' valign='top' style='background:url(images/main/footer.gif); background-repeat:no-repeat'>"; ?> <? include 'footer.php'; ?> <? echo "</td></tr></table></td> <td width='6' background='images/main/right.gif' align='right'><img src='images/main/right.gif' width='6' height='3'></td> </tr><tr> <td colspan='3' valign='bottom'><img src='images/main/bottom.gif' width='776' height='8'></td> </tr></table></td></tr></table></body></html>"; exit; } } ?> <form action="forgotpass.php?cmd=pro" method="POST"> <b class="text3">Email Address:</b> <input name="email" type="text" class="field3" maxlength="30"> <input type="submit" class="button1" value="Get New Password"> </form><br></td> <td align="right" bgcolor="#B30110" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#B30110"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> </table><br></td> </tr> </table></td> </tr> <tr> <td valign="top" style="background:url(images/main/footer.gif); background-repeat:no-repeat"> <? include 'footer.php'; ?> </td> </tr> </table></td> <td width="6" background="images/main/right.gif" align="right"><img src="images/main/right.gif" width="6" height="3"></td> </tr> <tr> <td colspan="3" valign="bottom"><img src="images/main/bottom.gif" width="776" height="8"></td> </tr> </table></td> </tr> </table> </body> </html> and this is the code for my 2nd one <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>:: JobHiRings - Forgot Password ::</title> <style type="text/css"> <!-- body { background-image: url(../images/main/bg.gif); } --> </style> <link href="../css.css" rel="stylesheet" type="text/css"> </head> <body> <table width="776" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="776" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top"><img src="../images/main/top.gif" width="776" height="6"></td> </tr> <tr> <td width="6" align="left" valign="top" background="../images/main/left.gif"><img src="../images/main/left.gif" width="6" height="14"></td> <td width="764" bgcolor="#FFFFFF"><table width="764" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="764" height="346"> <param name="movie" value="flash/main.swf"> <param name="quality" value="high"> <embed src="flash/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="764" height="346"></embed> </object></td> </tr> <tr> <td height="62" align="left" valign="top" bgcolor="#FFFFFF"><table width="764" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="181" valign="top" background="../images/main/bgbar.gif"><img src="../images/main/bgbar.gif" height="50"></td> <td width="344" valign="top" background="../images/main/bgbar.gif"> </td> <td width="239" background="../images/main/bgbar.gif"> </td> </tr> <tr> <td colspan="3" align="center" valign="top"><br><table width="416" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#B30110"><img src="../images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="left" bgcolor="#B30110" width="1"><img src="../images/spacer.gif" width="1" height="1" /></td> <td width="414" align="center"><br> <h1 class="text7">Forgot Password</h1> <span class="text8">You can reset your password here and send a copy to your email address.<br> Simply enter your email address below to have your password reset.</span><br> <br> <?php include '../admean/db_connect.php'; $query="SELECT email, password FROM applicant where email='$email'"; $result=mysql_query($query); while($rec=mysql_fetch_assoc($result)){ $mail=$_POST['email']=$rec['email']; } if(mysql_num_rows($result)==1){ $password2 = $password; $password1=md5($password); if($_GET['cmd']=="update"){ $query2="UPDATE applicant set `password`='$password1' where `email` = '$email' "; $result=mysql_query($query2)or die(mysql_error()); $Message = ""; $Message .= "Hello\n"; $Message .= "This is a password change request\n"; $Message .= "that you made from JobHiRings\n"; $Message .= "\n\n"; $Message .= "please keep this new password in a safe place\n"; $Message .= "----------------------------\n"; $Message .="Your new password is:" .$password2."\n"; $Message .= "\n\n"; $Header = "postmaster@jobhirings.com"; $To = "$email"; $Subject = "Your New Password"; mail($To,$Subject,$Message,"From: $Header"); echo " <div align='center'><b class='text3'>Thank you password changed!<br> We have sent a copy to your email address!<div></b><br><br><a href='../index.php' class='link2'>Please try to login now</a><br><br></td> <td align='right' bgcolor='#B30110' width='1'><img src='../images/main/spacer.gif' width='1' height='1' /></td> </tr><tr> <td colspan='3' valign='top' bgcolor='#B30110'><img src='../images/main/spacer.gif' width='1' height='1' /></td> </tr></table><br></td></tr></table></td></tr><tr> <td colspan='2' valign='top' style='background:url(../images/main/footer.gif); background-repeat:no-repeat'>"; ?> <? include '../footer.php'; ?> <? echo "</td></tr></table></td> <td width='6' background='../images/main/right.gif' align='right'><img src='../images/main/right.gif' width='6' height='3'></td> </tr><tr> <td colspan='3' valign='bottom'><img src='../images/main/bottom.gif' width='776' height='8'></td> </tr></table></td></tr></table></body></html>"; exit; } if($_GET['cmd']=="pro"){ echo"<div><form action='forgotpass.php?cmd=update ' method='POST'> <b class='text3'>Please provide a new password</b><br><br> <input type='password' name='password' maxlength='30'> <br> <br> <input type='submit' value='New Password' class='button1'> </form><br></td> <td align='right' bgcolor='#B30110' width='1'><img src='../images/main/spacer.gif' width='1' height='1' /></td> </tr><tr> <td colspan='3' valign='top' bgcolor='#B30110'><img src='../images/main/spacer.gif' width='1' height='1' /></td> </tr></table><br></td></tr></table></td></tr><tr> <td colspan='2' valign='top' style='background:url(../images/main/footer.gif); background-repeat:no-repeat'>"; ?> <? include '../footer.php'; ?> <? echo "</td></tr></table></td> <td width='6' background='../images/main/right.gif' align='right'><img src='../images/main/right.gif' width='6' height='3'></td> </tr><tr> <td colspan='3' valign='bottom'><img src='../images/main/bottom.gif' width='776' height='8'></td> </tr></table></td></tr></table></body></html>"; exit; } } ?> <form action="forgotpass.php?cmd=pro" method="POST"> <b class="text3">Email Address:</b> <input name="email" type="text" class="field3" maxlength="30"> <input type="submit" class="button1" value="Get New Password"> </form><br></td> <td align="right" bgcolor="#B30110" width="1"><img src="../images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#B30110"><img src="../images/spacer.gif" width="1" height="1" /></td> </tr> </table><br></td> </tr> </table></td> </tr> <tr> <td valign="top" style="background:url(../images/main/footer.gif); background-repeat:no-repeat"> <? include '../footer.php'; ?> </td> </tr> </table></td> <td width="6" background="../images/main/right.gif" align="right"><img src="../images/main/right.gif" width="6" height="3"></td> </tr> <tr> <td colspan="3" valign="bottom"><img src="../images/main/bottom.gif" width="776" height="8"></td> </tr> </table></td> </tr> </table> </body> </html> notice that the links of the images are the only one that was changed, the table name of the database and the location of my db_connect.php other than that, everything is the same. hope you could help me trace and solve the problem. thanks!
-
any help for this? thanks!
-
guys, what does this mean? Warning: mail() [function.mail]: SMTP server response: 503 5.5.2 Need Rcpt command. in c:\hosting\webhost4life\member\diorgrace\forgotpass.php on line 90 i dont know what this error mean and this came out from my reset password page below is the code for my reset password page <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>:: JobHiRings - Forgot Password ::</title> <style type="text/css"> <!-- body { background-image: url(images/main/bg.gif); } --> </style> <link href="css.css" rel="stylesheet" type="text/css"> </head> <body> <table width="776" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="776" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top"><img src="images/main/top.gif" width="776" height="6"></td> </tr> <tr> <td width="6" align="left" valign="top" background="images/main/left.gif"><img src="images/main/left.gif" width="6" height="14"></td> <td width="764" bgcolor="#FFFFFF"><table width="764" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="764" height="346"> <param name="movie" value="../new/flash/main.swf"> <param name="quality" value="high"> <embed src="../new/flash/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="764" height="346"></embed> </object></td> </tr> <tr> <td height="62" align="left" valign="top" bgcolor="#FFFFFF"><table width="764" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="181" valign="top" background="images/main/bgbar.gif"><img src="images/main/bgbar.gif" height="50"></td> <td width="344" valign="top" background="images/main/bgbar.gif"> </td> <td width="239" background="images/main/bgbar.gif"> </td> </tr> <tr> <td colspan="3" align="center" valign="top"><br><table width="416" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#B30110"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="left" bgcolor="#B30110" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> <td width="414" align="center"><br> <h1 class="text7">Forgot Password</h1> <span class="text8">You can reset your password here and send a copy to your email address.<br> Simply enter your email address below to have your password reset.</span><br> <br> <?php session_start(); include 'admean/db_connect.php'; $query="SELECT email, password FROM applicant where email='$email'"; $result=mysql_query($query); while($rec=mysql_fetch_assoc($result)){ $mail=$_SESSION['email']=$rec['email']; } if(mysql_num_rows($result)==1){ $password2 = $password; $password1=md5($password); if($_GET['cmd']=="update"){ $query2="UPDATE applicant set `password`='$password1' where `email` = '$email' "; $result=mysql_query($query2)or die(mysql_error()); $Message = ""; $Message .= "Hello\n"; $Message .= "This is a password change request\n"; $Message .= "that you made from JobHiRings\n"; $Message .= "\n\n"; $Message .= "please keep this new password in a safe place\n"; $Message .= "----------------------------\n"; $Message .="Your new password is:" .$password2."\n"; $Message .= "\n\n"; $Header = "postmaster@jobhirings.com"; $To = "$email"; $Subject = "Your New Password"; mail($To,$Subject,$Message,"From: $Header"); echo " <div align='center'><b class='text3'>Thank you password changed!<br> We have sent a copy to your email address!<div></b><br><br><a href='index.php' class='link2'>Please try to login now</a><br><br></td> <td align='right' bgcolor='#B30110' width='1'><img src='images/main/spacer.gif' width='1' height='1' /></td> </tr><tr> <td colspan='3' valign='top' bgcolor='#B30110'><img src='images/main/spacer.gif' width='1' height='1' /></td> </tr></table><br></td></tr></table></td></tr><tr> <td colspan='2' valign='top' style='background:url(images/main/footer.gif); background-repeat:no-repeat'>"; ?> <? include 'footer.php'; ?> <? echo "</td></tr></table></td> <td width='6' background='images/main/right.gif' align='right'><img src='images/main/right.gif' width='6' height='3'></td> </tr><tr> <td colspan='3' valign='bottom'><img src='images/main/bottom.gif' width='776' height='8'></td> </tr></table></td></tr></table></body></html>"; exit; } if($_GET['cmd']=="pro"){ echo"<div><form action='forgotpass.php?cmd=update ' method='POST'> <b class='text3'>Please provide a new password</b><br><br> <input type='password' name='password' maxlength='30'> <br> <br> <input type='submit' value='New Password' class='button1'> </form><br></td> <td align='right' bgcolor='#B30110' width='1'><img src='images/main/spacer.gif' width='1' height='1' /></td> </tr><tr> <td colspan='3' valign='top' bgcolor='#B30110'><img src='images/main/spacer.gif' width='1' height='1' /></td> </tr></table><br></td></tr></table></td></tr><tr> <td colspan='2' valign='top' style='background:url(images/main/footer.gif); background-repeat:no-repeat'>"; ?> <? include 'footer.php'; ?> <? echo "</td></tr></table></td> <td width='6' background='images/main/right.gif' align='right'><img src='images/main/right.gif' width='6' height='3'></td> </tr><tr> <td colspan='3' valign='bottom'><img src='images/main/bottom.gif' width='776' height='8'></td> </tr></table></td></tr></table></body></html>"; exit; } } ?> <form action="forgotpass.php?cmd=pro" method="POST"> <b class="text3">Email Address:</b> <input name="email" type="text" class="field3" maxlength="30"> <input type="submit" class="button1" value="Get New Password"> </form><br></td> <td align="right" bgcolor="#B30110" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#B30110"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> </table><br></td> </tr> </table></td> </tr> <tr> <td valign="top" style="background:url(images/main/footer.gif); background-repeat:no-repeat"> <? include 'footer.php'; ?> </td> </tr> </table></td> <td width="6" background="images/main/right.gif" align="right"><img src="images/main/right.gif" width="6" height="3"></td> </tr> <tr> <td colspan="3" valign="bottom"><img src="images/main/bottom.gif" width="776" height="8"></td> </tr> </table></td> </tr> </table> </body> </html> hope you could help me fix this. thanks!
-
guys, any joomla users here? i need help in creating forms for the administrator users. thanks!
-
thanks! i will try this out.