Inlogtable op homepage

Pagina: 1
Acties:
  • 67 views sinds 30-01-2008

  • QUILIX
  • Registratie: Juni 2001
  • Laatst online: 10-09-2024

QUILIX

zZzZzZz.....

Topicstarter
Ik ben een opensource PHP advertentiescript aan het aanpassen (een soort speurders.nl script). De script is verdeeld in een map met php scripts en een map met html templates. Bij het inloggen gaat men naar member_login.php die de template loginbox.html oproept (naast de header en footer templates). De script heeft zelf een index.php pagina, maar ik ben nu bezig met het ontwerpen van een index.html pagina die de homepage zal worden. Ik zal voor de index.html bestand via .htaccess zorgen dat het eerder dan index.php en als als PHP wordt gelezen.

Op de hoofdpagina die ik ontwerp wil ik linksboven een loginplekje hebben met een username veld, een password veld en een login knopje. Ik heb include member_login.php geprobeerd maar de design wordt vervormd omdat het de header en footer ook invoegd. Ik heb geprobeerd om de code te kopieren en in de hoofdpagina te plaatsen van zowel de .php bestand als de .html template. Ook lukt dit niet. Ik heb niet zo veel verstand van php.

Mijn vraag is nu:
Wat moet ik doen om in een table op de index pagina de loginbox te plaatsen.
Welke codes zijn voldoende om over te nemen.

Hieronder de inhoud van member_login.php:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?
if (!isset($_SESSION))
    session_start();
?>

<table border="0" width="100%" cellspacing="0" cellpadding="10">
  <tr>
    <td width="100%">

<table>
<tr>
<td valign="top" width="200" height="100%">

  <table border="0" width="100%" cellspacing="0" cellpadding="1" bgcolor="#A9B8D1">
    <tr>
      <td width="100%" bgcolor="#A9B8D1">
        <table border="0" width="100%" cellspacing="0" cellpadding="5">
          <tr>
            <td width="100%"><b><? echo $la_member_area ?> </b>
            </td>
          </tr>
        </table>
        <table border="0" width="100%" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0">
          <tr>
            <td width="100%">
              <table border="0" width="100%" cellspacing="0" cellpadding="5">
                <tr>
                  <td align="left" nowrap><a href = "member.php">[img]"layout_images/pointer.gif"[/img]<? echo $la_admin_frontpage
                    ?></a></td>
                </tr>
                <tr>
                  <td align="left" nowrap><a href = "add_ad_cat.php">[img]"layout_images/pointer.gif"[/img]<? echo $la_new_ad
                    ?></a></td>
                </tr>
                <tr>
                  <td align="left" nowrap><a href = "my_items.php">[img]"layout_images/pointer.gif"[/img]<? echo $la_edit_ad
                    ?></a></td>
                </tr>
        <?
        if ($set_favourites)
        {
        ?>          
                <tr>
                  <td align="left" nowrap><a href = "fav.php">[img]"layout_images/pointer.gif"[/img]<? echo $la_favourite ?></a></td>
                </tr>
         <?
        }
        ?>       
                
        <? 
        include "admin/config/pay.inc.php";        
        
        if (!empty($gw_clickbank) or !empty($gw_paypal) or !empty($gw_worldpay) or !empty($gw_authnet) or !empty($gw_Moneybookers) OR !empty($gw_2checkout))
        {
        ?>
        
        
                
                <tr>
                  <td align="left" nowrap><a href = "payment_options.php">[img]"layout_images/pointer.gif"[/img]<? echo $la_payment ?></a></td>
                </tr>
        <?
        }
        ?>       
                
                <tr>
                  <td align="left" nowrap><a href = "change.php">[img]"layout_images/pointer.gif"[/img]<? echo $change_user
                    ?></a></td>
                </tr>
                <tr>
                  <td align="left" nowrap><a href = "pass.php">[img]"layout_images/pointer.gif"[/img]<? echo $la_change_pass
                    ?></a></td>
                </tr>
                <tr>
                  <td align="left" nowrap><a href = "member_login.php?logout=1">[img]"layout_images/pointer.gif"[/img]<?
                    echo $la_log_out ?></a></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>

</td>
    </tr>
  </table>

  <!-- Table menu -->

<!-- END Table menu -->
</td>
<td valign="top" width="10" height="100%">

  [img]"layout_images/spacerbig.gif"[/img]
</td>
<td align="left" valign="top" width="100%">
<!-- // Member header -->

  <table border="0" width="100%" cellspacing="0" cellpadding="1" bgcolor="#A9B8D1">
    <tr>
      <td width="100%" bgcolor="#A9B8D1">
        <table border="0" width="100%" cellspacing="0" cellpadding="5">
          <tr>
            <td width="100%"><b><? 
            if (isset($_SESSION["valid_user"]))
            {
            $r = q($sql = "select name from $usr_tbl where email = '".$_SESSION["valid_user"]."'");
                        $row_user = mysql_fetch_array($r);
                        $name = $row_user["name"];
                        echo formatString("$la_logged_in",array($name));
            }
            ?></b></td>
          </tr>
        </table>
        <table border="0" width="100%" bgcolor="#FFFFFF" cellspacing="0" cellpadding="5">
          <tr>
            <td width="100%">



Hieronder de inhoud van loginbox.html:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<table border="0" cellspacing="0" cellpadding="0">

<tr>
        <td valign="top" align="left" width="%SET_SIZE%">
        
        <!-- Login screen START -->    
        <table border="0" width="100%" bgcolor="%SET_OUTER_COLOR%" cellspacing="0" cellpadding="1">
        <tr>
            <td width="100%" valign="top">
                    <table border="0" width="100%" bgcolor="%SET_INNER_COLOR%" cellspacing="0" cellpadding="0"  height="250">
                <tr><td bgcolor="#FFFFFF">
                    %LA_LOGIN_TEXT%
                        <form method="post" action="member_login.php"%TARGET%><p>
                        <input type="hidden" name="redirect_to" value="%SENDTO%">
                             %LA_USERID%:<br />
                             <input type="text" class="txt" name="username" value="%USERNAME%" />
                             <p>
                              %LA_PASSWORD%:<br />
                              <input type="password" class="txt" name="password" value="%PASSWORD%" /><br />
                              
                              <input type="submit" name="submit" value="%LA_LOGIN%" />
                            </form>
                        </td>
                </tr>
                    </table>
            </td>
        </tr>
        </table>
        <!-- Login screen END -->    
        
    
        </td>
</tr>
</table>

  • Creepy
  • Registratie: Juni 2001
  • Laatst online: 21:03

Creepy

Tactical Espionage Splatterer

P&W is er voor de zaken die we zelf ontwikkelen. Als je een opensource produkt wilt aanpassen dan is dat prima maar voor support kan je het beste terecht op de website van het produkt zelf.

Daarbij komt dat meldingen als "het lukt niet", "hij pakt het niet", "hij doet het niet" echt helemaal niks zeggen dus zelfs als ik je zou willen helpen zonder die flinke lap code door te gaan lezen zou dat ook al niet gaan...

Zie ook P&W FAQ - De "quickstart"

"I had a problem, I solved it with regular expressions. Now I have two problems". That's shows a lack of appreciation for regular expressions: "I know have _star_ problems" --Kevlin Henney


Dit topic is gesloten.