11-2
上課範例:pda.php
03 | include_once "header.php" ; |
04 | include_once "up_file.php" ; |
08 | $cate =get_contact_cate_all(); |
10 | $sql = "select * from `" . $xoopsDB ->prefix( "contact" ). "` " ; |
11 | $result = $xoopsDB ->query( $sql ) or redirect_header( $_SERVER [ 'PHP_SELF' ],3, mysql_error()); |
12 | $content = "<li data-role='list-divider'>所有通訊錄列表</li>" ; |
13 | while ( $all = $xoopsDB ->fetchArray( $result )){ |
15 | foreach ( $all as $k => $v ){ |
19 | $photo_file = get_pic_file( 'photo' , $sn , 1 , 'thumb' ); |
20 | $photo = empty ( $photo_file )? "" : "<img src='{$photo_file}'>" ; |
24 | <a href= 'data.php?sn=$sn' >{ $photo }<h3>{ $name }</h3><p>電話:{ $tel } 信箱:{ $email }</p></a> |
25 | <span class = 'ui-li-count' >{ $cate [ $gsn ][ 'title' ]}</span> |
36 | <meta charset= 'utf-8' > |
37 | <meta name= 'viewport' content= 'width=device-width, initial-scale=1' > |
38 | <link rel= 'stylesheet' href= '".XOOPS_URL."/modules/tadtools/jquery.mobile/jquery.mobile.css' /> |
39 | <script src= '".XOOPS_URL."/modules/tadtools/jquery/jquery.js' ></script> |
40 | <script src= '".XOOPS_URL."/modules/tadtools/jquery.mobile/jquery.mobile.js' ></script> |
45 | <div data-role= 'page' id= 'p1' > |
46 | <div data-role= 'header' > |
47 | <a data-icon= 'arrow-l' data-rel= 'back' >回上頁</a> |
49 | <a href= 'pda.php' data-icon= 'home' >回首頁</a> |
51 | <div data-role= 'content' > |
53 | <ul data-role= 'listview' data-inset= 'false' > |
58 | <div data-role= 'footer' ></div> |