/[drupal]/contributions/sandbox/alaa/snippets/kefaya_members_page.php
ViewVC logotype

Contents of /contributions/sandbox/alaa/snippets/kefaya_members_page.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Mar 21 23:19:50 2006 UTC (3 years, 8 months ago) by alaa
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
some page and block snippets
1 <?php
2
3 $query="select a.data as name,b.data as job,b.sid from webform_submitted_data as a, webform_submitted_data as b where a.sid=b.sid and a.name='الأسم' and b.name='الوظيفة' and a.nid=1 and b.nid=1";
4
5 $count_query="select count(distinct(sid)) from webform_submitted_data where nid=1";
6
7 $result= pager_query($query, 100, 0, $count_query);
8
9 $rows=array();
10 while($row=db_fetch_array($result)) {
11 if(user_access("maintain webforms")) {
12 $row[]=l("تفاصيل","node/1?sid=".$row['sid'])
13 ." / ".
14 l("احذف","node/1/results/delete/".$row['sid']);
15 }
16 $rows[]=$row;
17 }
18
19
20 $header=array("الأسم","الوظيفة","م");
21 if(user_access("maintain webforms")){
22 $header[]="ادارة";
23 }
24
25 print theme('table',$header,$rows);
26
27 print theme('pager', NULL, 100);
28
29 ?>
30
31

  ViewVC Help
Powered by ViewVC 1.1.2