Jump to content

hamza

Members
  • Posts

    321
  • Joined

  • Last visited

Posts posted by hamza

  1. need to know that.

    Is this is a appropiate way of giving path in the

    menu or anything else you like to suggest me.

    And

    any other logic usully professional follow to make

    dynamic menu paths/

     

    config.php

    <?php

    //echo $docroot = $_SERVER['DOCUMENT_ROOT'].'<br>';

    //echo __FILE__;

    $docroot = $_SERVER['PHP_SELF'];

    //$docroot = $_SERVER['DOCUMENT_ROOT'];

    //$docroot = __FILE__;

     

    $curPage = $PHP_SELF;

    $curPage = path_get_last_arg($curPage);

     

    $docroot = str_replace("\\","/",$docroot);

    $docroot = str_replace($curPage,"",$docroot);

     

     

    function path_get_last_arg($path){

    $path = str_replace('\\', '/', $path);

    $path = preg_replace('/\/+$/', '', $path);

    $path = explode('/', $path);

    $l = count($path)-1;

    return isset($path[$l]) ? $path[$l] : '';

    }

    ?>

     

    menu.php

    <?php require_once('config.php'); ?>

    <table width="200" border="1">

    <tr>

    <td align="center"><h4> MENU </h4></td>

    </tr>

    <tr>

    <td><a href="<?php echo $docroot; ?>link1.php">link1</a></td>

    </tr>

    <tr>

    <td><a href="<?php echo $docroot; ?>link2.php">link1</a></td>

    </tr>

    <tr>

    <td><a href="<?php echo $docroot; ?>link3.php">link1</a></td>

    </tr>

    </table>

     

    template.php

    <style>

    .abc {

    border: thin dotted #CCFF99;

    color: #FF0066;

    }

    </style>

    <table width="750" height="750" border="1" class="abc">

    <tr>

    <td colspan="3" align="center" height="80">header</td>

    </tr>

    <tr>

    <td width="150" valign="top"><?php require_once('menu.php'); ?></td>

    <td width="600"><?php echo $contents; ?> </td>

    </tr>

    <tr>

    <td colspan="3" height="80" align="center">footer</td>

    </tr>

    </table>

     

    link1.php

    <?php

    $contents='link1';

    require_once('template.php');

    ?>

     

    link3.php

    <?php

    $contents='link2';

    require_once('template.php');

    ?>

    same as

    <?php

    $contents='link3';

    require_once('template.php');

    ?>

  2. thanks for your time

     

    yeah i actually no knowledge of banking so

    i thought that if i start project like this

    then may be i will make my self understand

    of banking a little bit understanding i have

    got now

    my both banking and knowledge purpose

    after making this

    and lucky i have got A grade in it

    but i want it to imporve more

    that is why i need comments

     

     

    in last paragraph

    not  a little bit understanding i have got.

  3. in IE it works file according to widht height give to it

    if you run it in FF , and safari it will give different display

    can anyone tell me what is that mean

    and how should i improve this /.

     

    <style type="text/css">

    .divcontainer {

    width:500px;

    height:350px;

        color:#000000;

    background-color:#CCFFFF;

    }

     

    .formcontainer { 

      padding-bottom: 9px;

      font-family:"Times New Roman", Times, serif;

      font-size:12px; 

      border: 1px medium #000000;  /* not working*/

     

    .text {

    display:inline;

    text-align:left;

    /* background-color:#00CC00; */

    width:200px;

     

    }

     

    .input {

        display:inline;

    text-align:left;

    /* background-color:#CCFFFF; */

        width:300px;

    }

     

    #inputextra {

      display:inline; 

    }

     

    #header {

    text-align:center;

    padding-bottom: 30px;

    font:larger;

    font-family:"Courier New", Courier, monospace;

    font-size:18px;

    color:#003333;

    text-decoration:underline;

    font:bold;

    }

     

    #buttons {

    padding-left: 200px;

     

    }

    </style><div class="divcontainer">

    <form action="add.php" method="post" onSubmit="return field_filter();">

     

      <div id="header">Customer Account Opening</div>

     

    <div class="formcontainer">

    <p class="text">*Account No</p>

    <p class="input">

    <select name="account_no_series">

      <option value="" selected="selected">----</option>

      <option value="12345">12345</option>

      <option value="110101">110101</option>

    </select>

     

    <input type="text" name="account_no" onChange="setInterval('enable_disable()',100);" onFocus="setInterval('enable_disable()',100);" onBlur="setInterval('enable_disable()',100);" size="15" ></p>

    </div>

    <div class="formcontainer">

              <p class="text">*Title Of Account</p>

      <p class="input"><input type="text" name="account_title" onChange="setInterval('enable_disable()',100);" onFocus="setInterval('enable_disable()',100);" onBlur="setInterval('enable_disable()',100);" /></p>

    </div> 

     

    <div class="formcontainer">

              <p class="text">*Type Of Account</p>

      <p class="input">

      <select name="account_type" class="select" onChange="setInterval('enable_disable()',100 );" onFocus="setInterval('enable_disable()',100);" onBlur="setInterval('enable_disable()',100);">

      <option value="">Select Account type</option>

      <option value="Current">Current</option>

      <option value="Saving">Saving</option>

      <option value="Resident">Resident</option>  

      </select>

      </p>

      </div>  

     

      <div class="formcontainer">

    <p class="text">*Status Of Account</p>

    <p class="input">

    Single<input type="radio" name="status_type" value="Single" checked="checked">

    Joint<input type="radio" name="status_type" value="Joint">

    Company<input type="radio" name="status_type" value="Company">

    </p>

    </div>

     

    <div class="formcontainer">

    <p class="text">*Opration Of Account</p>

    <p class="input">

    Single<input type="radio" name="account_operation" value="Single" checked="checked">

    Joint<input type="radio" name="account_operation" value="Joint">

    </p>

    </div>

     

    <div class="formcontainer">

    <p class="text">*Currency</p>

    <p class="input">

    <select name="account_currency" class="select" onChange="setInterval('enable_disable()',100);" onFocus="setInterval('enable_disable()',100);" onBlur="setInterval('enable_disable()',100);">

      <option value="">Select currency</option>

      <option value="PUK">Pak Rupees (PUK)</option>

      <option value="USD">US Doller (USD)</option>

      <option value="CAD"> Canada (CAD) </option>

      <option value="EUR">Europe (EUR) </option> 

      </select>

    </p>

    </div>

     

    <div class="formcontainer">

      <p id="buttons">

    <input type="submit" value="Next" name="submit" disabled="disabled">

    <input type="button" value="Cancel" onClick="window.location='manage_users.php'"/>

      </p>

    </div> </form>    

    </div>

     

     

     

     

     

     

     

     

  4. Please check my all work and tell me possible soultion and error's for improvement.

    here is the links to check it

     

     

    My project is basically a simple online banking system which offer basic services towords customers

    and

    please tell me how it is and how much it needs to improve in which

    areas i will work more to get the grade A

    waitign for your valueable reply

     

    the website link is show below :

     

    main page

    http://76.163.166.217/hamza/my_work/user/main_page.php

     

    and

    ON LEFT side of the meue click on the link onlin_banking

    then it will as you for login name and password

    then enter hamza username and password is hamza

    enter in the site and explore the following optiosn

    please check both admin and user side as well

     

    waiting for the valuable replies

     

     

  5. there is a code below actually the problem is

    in first row i have 2 td's and in 5th row i have 2 td's as well

    but

    when i width of bot rows td's are not accepting different widht

    as you see in the code

    row 1 td's have different width

    row 5 td's have different width

    but both are accepting one width

    why this is happening?

     

     

    <html>

    <head>

    <title>index</title>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <link href="css/style.css" rel="stylesheet" type="text/css">

    </head>

    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

    <!-- ImageReady Slices (wallpaper.psd) -->

    <table width="750" height="750" border="1" cellpadding="0" cellspacing="0" align="center">

    <tr>

    <td width="50"><img src="images/index_01.jpg" width="404" height="72" alt=""></td>

    <td width="96"><img src="images/index_02.jpg" width="346" height="72" alt=""></td>

    </tr>

    <tr>

    <td colspan="2" width="750"><img src="images/index_03.jpg" height="21" alt=""></td>

    </tr>

    <tr>

    <td colspan="2"><img src="images/index_04.jpg" height="26" alt=""></td>

    </tr>

    <tr>

    <td colspan="2" width="750"><img src="images/index_05.jpg" height="70" alt=""></td>

    </tr>

    <tr>

    <td width="200" height="750"> </td>

    <td background="images/spacer.gif"> </td>

    </tr>

    <tr>

    <td colspan="2">footer</td>

    </tr>

    </table>

    <!-- End ImageReady Slices -->

    </body>

    </html>

  6. yeah it is working fine with the browser's

    there must be a little problem i dont have opera

    so its quite difficult to try thsi problem

     

    but change anyother php funtion

    other then this strpos because

    function in php are not 100% successfully

    running every time there are many problems

    in fucntion some time it works sometimes not,.

     

    so i suggest you to change or use any other one

     

    thanks and regards

  7. help me with this width's of td 's are not setting according to given width

     

    <html>

    <head>

    <title>index</title>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <link href="css/style.css" rel="stylesheet" type="text/css">

    </head>

    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

    <!-- ImageReady Slices (wallpaper.psd) -->

    PROBLEM:<br>

    ----------

    <br>

    the actual problem is in both rows the width of the td is not setting at all

    please help me out and set the with of two td's according to specification

    thanks

    <hr><br><br>

    <table width="100%" border="1" align="center">

    <tr>

    <td width="20%">r1 c1 (width should be 20%)</td>

    <td width="80%"> r1 c2 (width should be 80%) </td>

    </tr>

    <tr>

    <td colspan="2"> </td>

    </tr>

    <tr>

    <td colspan="2"> </td>

    </tr>

    <tr>

    <td colspan="2"> </td>

    </tr>

    <tr>

    <td width="40%">r5 c1 (width should be 40%)</td>

    <td width="60%">r5 c2 (width should be 60%)</td>

    <!-- background="images/spacer.gif" -->

    </tr>

    <tr>

    <td colspan="2">footer</td>

    </tr>

    </table>

    <!-- End ImageReady Slices -->

    </body>

    </html>

     

  8. Dear friend

     

      you can do this by using regular expression

     

      search the google for the regular expression and

      study regular expression you can get understand

      very soon. for example this is a email check below

     

    var emailPatteren=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$/

    if ( emailPatteren.test(document.forms[0].email.value ) ) {

     

    return true;

    }else {

    alert("--------Wrong Email Address----------------");

    return false;

    }

    }

     

     

  9. <?php

    function sum($a, $b)

    {

        return $a + $b;

    }

     

    /**

    * check data has been sent

    */

        if (isset($_GET['sub']) && !empty($_GET['a']) && !empty($_GET['b']))

        {

            $a = $_GET['a'] ;

            $b = $_GET['b'] ;

           

                /**

                * output the value returned by the function

                */

    echo "

    <fieldset>

                      <legend> Result  </legend>

    $a + $b =".sum($a, $b)."  

    </fieldset>

    ";       

           

        }

    ?>

     

     

        <!-- html form

        No action specified so the default is itself as the action page

        Define method as GET.

       

        If you use POST method, change $_GET above to $_POST

        -->         

    <form action="" method="GET">

    <input type="text" name="a" size="5"> + <input type="text" name="b" size="5">

    <input type="submit" name="sub" value="Add">

    </form>

×
×
  • 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.