Jump to content

Marooon

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Everything posted by Marooon

  1. first i am sorry for the upper case issue , i used to code with Upper case due to the case sensitive issue. i found a work around as below : FUNCTION GET_SPECIFEC_ATT($ATT,$LANG) { $ATT=$this->$ATT; IF (is_array($ATT)) { return $ATT["L".$LANG]; } else { return $ATT; } } also i tried xyph solution it is working thank you all alot ,
  2. I Think i figured out what is the problem in this case echo $this->$ATT['L' . $LANG]; it is dealing with $ATT as an array and trying to find the offset LA, which doesnt exist i tried to do that FUNCTION GET_SPECIFEC_ATT($ATT,$LANG) { $ATT=$ATT.'["LA"]'; ECHO $ATT; echo $this->$ATT; } but i am getting this error now : Notice: Undefined property: ACCOUNT::$BRANCH_NAME["LA"] in D:\wamp\www\EBANK\account.class on line 189 Please help
  3. also thorpe , can you please guide me what am i doing wrong ? thanks a lot
  4. Dear thorpe i am getting the same error Notice: Undefined property: ACCOUNT::$B in D:\wamp\www\EBANK\account.class on line 185 Dear Zephni that it is the way i call the function : function is : FUNCTION GET_SPECIFEC_ATT($ATT,$LANG) { echo $this->$ATT['L' . $LANG]; } how i call it : $ACCOUNTS[$i]=NEW ACCOUNT($CIF_ACCOUNTS[$i]); ECHO $ACCOUNTS[$i]->GET_SPECIFEC_ATT("BRANCH_NAME","A"); thank you for your help
  5. Dear Zephni, the ATT is not a property of the class, it a variable used inside this method(function). the $ATT includes the property i want to use . in my case: FUNCTION GET_SPECIFEC_ATT($ATT,$LANG) { $ATT=$ATT."['L$LANG']"; ECHO $this->$ATT; } when i call this function like FUNCTION GET_SPECIFEC_ATT('BRANCH_NAME','A') THE $ATT WILL be equal to BRANCH_NAME['LA'] the echo statment should be : echo $this->BRANCH_NAME['LA'] but iam getting that error thank you
  6. thank you again That is the problem , it is defined but not working . i will appreciate your help a lot. i will try to reformat the code to be better thank you
  7. First thanks for your answer ,i am sorry i missed a line while copying it from my code , the last line in the properties is private $BRANCH_NAME= ARRAY("LA"=>'',"LE"=>''); calling it as below is working fine : echo $this->BRANCH_NAME["LA"]; i didnt get you why this code considered ugly
  8. Dear all , i am trying the following : i have a class named ACCOUNT with many properties in .some of these properties are array , it is like this : class ACCOUNT { PRIVATE $DB_LINK; PRIVATE $COMP; PRIVATE $BRANCH; PRIVATE $CURRENCY; PRIVATE $GL; PRIVATE $CIF; PRIVATE $SL; PRIVATE $EXIST; PRIVATE $STATUS; private $ACCOUNT_NAME=ARRAY("LA"=>'',"LE"=>'',"SA"=>'',"SE"=>''); private $ACCOUNT_BALANCE =ARRAY('FC_YTD','CV_YTD','CV_BAL','YTD_BAL','BLOCKED_CV','BLOCKED_FC'); private $CY_NAME=ARRAY("LA"=>'',"LE"=>'',"SA"=>'',"SE"=>''); private $ACCOUNT_NAME_USR=ARRAY("LA"=>'',"LE"=>'',"SA"=>'',"SE"=>''); private $LEDGER_NAME= ARRAY("LA"=>'',"LE"=>''); i have created the following method to call any property [code] FUNCTION GET_SPECIFEC_ATT($ATT,$LANG) { $ATT=$ATT."['L$LANG']"; ECHO $this->$ATT; } but i am getting the below error : Notice: Undefined property: ACCOUNT::$BRANCH_NAME['LA'] in D:\wamp\www\EBANK\account.class on line 186 if i used this : echo $this->BRANCH_NAME['LA']; it is working fine . and the method is working fine i can iam trying to call property which is NOT an array. Can you please help me in what iam doing wrong ? Thanks in advance
  9. if i got you right you can use this $curl = curl_init(); curl_setopt ($curl, CURLOPT_URL, "$URL"); $ANSWER=curl_exec ($curl); curl_close ($curl); where $url is the link you want . please notice the curl is an extension you have to add . It has many available options to use .
  10. it is quotes issue ; try this : $query = "select * from users where username='$username' and password='$password'";
  11. i was looking at wrong place , it is not a php error ! It is IE8 BUG! the images i was using were made in CYMK mode , not in RGB mode,while IE8 only support images created in RGB mode! the solution i came up with is converting the image mode before uploading it! Thank you all!
  12. i prefer using PHPDesigner , but it is not free:) it has more functions and help you a lot in formatting your code and checking it . if want free one you can use the notepad++ or any other suggested ones . good luck
  13. i dont think there is a url like that . it is either a GET method with format like : www.blalba.com?r=vlaue which you can get with $_GET['r'] or a post method with format like : www.blalba.com which you can get with $_POST['r'] please correct me if i am wrong .
  14. Same Error
  15. yes, also check the code for the non-closed tag. try to use some editor like notepad++ or phpDesigner , it will help you with syntax errors
  16. yes , as i told you its working fine when running it from firefox and ie9 any suggestions ?
  17. Dear Friend , you have a lot of non-closed tags in you code for example in line 47 <option value="7" <? if ($_POST['rows'] == 7) echo 'selected' ?> 7 </option> line 50 <option value="9" <?= ($_POST['rows'] == 9)?'selected':'notselected' ?> 9</option> also you can not have two <BODY> tag in one html like you did in line30 and line 79 also in line 31 there is no '<?=' you have to put a space between the ? and the = i think you need to review your code once again for the nonclosed tags
  18. Thanks for your reply this is the view source code i added some break lines around the img tag: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html dir="RTL" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" lang="en-us" > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <head> <title> </title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body>  <table border='0' bgcolor='white' width=80% align='center' > <tr > <td align='left'><font size=8 color='red'></font></td> <td width=10> <a href='/staff'> <img src='img/logo.jpg' align='left' border=0 /> </a> </td> </tr> </table> <table align='center' bgcolor='white' width=80%><tr><td><html DIR="RTL"><table width=100% border='1' cellpadding='8' align='center' bgcolor='white'><tr align='center'><td> الرقم الوظيفي :</td><td colspan='2'><strong>78</strong></td><td> : User ID </td><td rowspan='7'> <img src='IMAGE.php?id=78' width='225' height='300'/> </td></tr><tr align='center'><td> الاسم :</td><td><strong>مروان عدوان</strong></td><td><strong>Marwan Adwan</strong></td><td >Name </td></tr><tr align='center'><td> المنصب الوظيفي :</td><td><strong>مدير قسم التطوير والتنقيب عن البيانات بالوكالة </strong></td><td><strong> Acting MIS Manager</strong></td><td >Title </td></tr><tr align='center'><td>الإدارة :</td><td><a href='view_staff.php?dep=13' ><strong>إدارة تقنية المعلومات </strong></a></td><td><a href='view_staff.php?dep=13' ><strong>Information Technology Department</strong></a></td><td >Department </td></tr><tr align='center'><td>المقر :</td><td><a href='view_staff.php?loc=1'><strong>دمشق</strong></a></td><td><a href='view_staff.php?loc=1'><strong>Damascus</strong></a></td><td >Location </td></tr><tr align='center'><td>رقم الهاتف :</td><td colspan='2'><strong>988657179</strong></td><td >Mobile </td></tr><tr align='center'><td>البريد الإلكتروني :</td><td colspan='2'><a href='mailto:[email protected]'><strong>[email protected]</strong></a></td><td >E-mail </td></tr></TABLE><html><head><title>موظفي بنك البركة-سورية </title> <link rel="stylesheet" type="text/css" href="style.css" /> </head></html> <br> <table cellpadding='10' cellspacing='10' border='4' align='center' bgcolor='white'> <form name='search' METHOD='POST' action='View_staff.php'> <tr> <td>يرجى إدخال الرقم الوظيفي أو اسم الموظف المراد البحث عنه </td> <td><input NAME='search' type='text' id='search'/></td> <td><input type='submit' value='البحث'></td></form></tr> <form name='search_dep' METHOD='POST' action='View_staff.php' <tr> <td>عرض كافة الموظفين الموجودين بحسب إدارة :</td> <td><select name='search_dep'><option VALUE=1> ادارة الالتزام</option><option VALUE=2> ادارة التدقيق</option><option VALUE=3> ادارة الشؤون الادارية والموارد البشرية</option><option VALUE=4> الإدارة المالية </option><option VALUE=5> إدارة الشؤون القانونية</option><option VALUE=6> إدارة التسويق </option><option VALUE=7> إدارة الخزينة والاستثمار </option><option VALUE=8> إدارة الرقابة الشرعية </option><option VALUE=9> إدارة الرئيس التنفيذي </option><option VALUE=10> إدارة العمليات </option><option VALUE=11> إدارة الفروع </option><option VALUE=12> إدارة المخاطر </option><option VALUE=13> إدارة تقنية المعلومات </option><option VALUE=14> إدارة تمويل التجزئة </option><option VALUE=15> إدارة تمويل الشركات</option><option VALUE=16> مراسلين وسائقين</option><option VALUE=17> مستخدمين</option><option VALUE=18> موظفي استقبال </option><option VALUE=19> الفرع الرئيسي</option><option VALUE=20> مكتب الشهبندر</option><option VALUE=21> فرع المزة</option><option VALUE=22> فرع حلب </option><option VALUE=23> فرع حمص </option><option VALUE=24> فرع حماه </option><option VALUE=25> فرع ابو رمانة </option></select></td><td><input type='submit' value='البحث'></td></tr> </form> <form name='search_loc' METHOD='POST' action='View_staff.php' <tr> <td>عرض كافة الموظفين الموجودين بحسب منطقة </td> <td><select name='search_loc'><option VALUE=1> دمشق</option><option VALUE=2> حلب</option><option VALUE=3> حمص</option><option VALUE=4> حماة</option></select></td><td><input type='submit' value='البحث'></td></tr></table> </form> </td></tr> </table> <hr> <P ALIGN=Right><strong><strong></p> </body> </html>
  19. Hello all , I am facing a problem when trying to to show image files generated from php code in IE8 . it is working fine on firefox and IE9 . but in IE8 its showing the famous red X instead of the image ; belw is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html dir="RTL" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" lang="en-us" > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <head> <title>header </title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <?php mb_internal_encoding('UTF-8'); /** * @author IT Department * @copyright 2011 */ INCLUDE ("header.php"); INCLUDE ("connect.php"); if (isset($_GET['id'])) { $ID=$_GET['id']; $sql="select employees.USER_ID, employees.NAME_ARAB, employees.NAME_ENG, employees.TITLE_ARAB, employees.TITLE_ENG, department.DEP_NAME_ENG, department.DEP_NAME_ARAB, location.LOC_DESC_ENG, location.LOC_DESC_ARAB, employees.MOBILE, employees.EMAIL, employees.DEP, employees.LOC FROM employees,location,department WHERE employees.DEP=department.DEP_ID AND employees.LOC=location.LOC_ID and employees.USER_ID=$ID "; //echo $sql; $result=mysql_query($sql,$link); mysql_query("SET NAMES 'utf8'"); ECHO '<html DIR="RTL">'; echo "<table width=100% border='1' cellpadding='8' align='center' bgcolor='white'>"; while ($row = mysql_fetch_array($result, MYSQL_NUM)) { //$row = mysql_fetch_assoc($result); echo"<tr align='center'>"; echo"<td>"; ECHO " الرقم الوظيفي :"; echo"</td>"; echo"<td colspan='2'>"; ECHO "<strong>$row[0]</strong>"; echo"</td>"; echo"<td>"; ECHO " : User ID "; echo"</td>"; echo"<td rowspan='7'>"; ECHO "<img src='IMAGE.php?id=".$row[0]."' width='225' height='300'/>"; //the image echo"</td>"; echo "</tr>"; the php image file is : <?php INCLUDE ("connect.php"); $ID = "'".$_GET['id']."'"; $sql="SELECT PHOTO FROM employees WHERE USER_ID=$ID"; $result=mysql_query($sql,$link); $row = mysql_fetch_array($result); header("Content-type: image/pjpeg"); print ( $row[0]); ?> Thanks in advance for your help
×
×
  • 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.