这个模板有一个表单和两个按钮,Add 和Return/Cancel.
用户输入数据,first name,last name 和电子邮件字段.insert.php期望在名为x,y,z的变量中接收这些信息,用户点
击Add按钮将运行save.php.如果用户点击Return/Cancel,将会执行index.php. view.tpl 1 <html> 2 <head> 3 <title>{$TITLE}</title> 4 </head> 5 <body> 6 <table align="center"> 7 <tr> 8 <td align="center"> 9 <b>{$HEADER}</b> 10 </td> 11 </tr> 12 </table> 13 <table width="500" border="1" align="center"> 14 <tr> 16 <td align="center"> 17 <b>{$data0}</b> 18 </td> 19 <td align="center"> 20 <b>{$data1}</b> 21 </td> 22 <td align="center"> 23 <b>{$data2}</b> 24 </td> 25 <td align="center"> 26 <b>{$data3}</b> 27 </td> 28 </tr> 29 {section name=display loop=$users} 30 <tr> 31 <td> 32 {$users[display].ID} 33 </td> 34 <td> 35 {$users[display].FIRSTNAME} 36 </td> 37 <td> 38 {$users[display].LASTNAME} 39 </td> 40 <td> 41 {$users[display].EMAIL} 42 </td> 43 </tr> 44 {/section} 45 <br> 46 </table> 47 <br> 48 <table align="center"> 49 <tr> 50 <td align="center"> 51 <input name="vol" type="button" value="Return" onclick="javascript:location.href='index.php';"> 52 </td> 53 </tr> 54 </table> 55 </body> 56 </html> |