Changeset 927802
- Timestamp:
- 06/06/2014 03:09:16 PM (12 years ago)
- File:
-
- 1 edited
-
dbview/trunk/DBView.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dbview/trunk/DBView.class.php
r927730 r927802 6 6 Description: Presents the results of a database query in a table. The query can be saved as a view which can then be embedded in any post using a shortcode. Views can be created and edited in the admin pages. Cell contents can be manipulated with PHP snippets. 7 7 Author: John Ackers 8 Version: 0.5. 48 Version: 0.5.5 9 9 Author URI: john . ackers ATT ymail . com 10 10 */ … … 21 21 public $cellFunction = array(); 22 22 23 /** 24 * create a permalink to another dbview 25 * useful when creating PHP snippets. 26 * 27 * Clicking on the link, replaces the existing table with another table 28 * 29 * @param string $text 30 * @param string $dbviewName 31 */ 32 33 static function link($text, $dbviewName, $arg1=null, $arg2=null) 34 { 35 $args = "" ; 36 if (!empty($arg1)) $args .= "&arg1=".$arg1 ; 37 if (!empty($arg2)) $args .= "&arg2=".$arg2 ; 38 return "<a href=\"?action=dbview&verb=autoLoad&name=$dbviewName$args\" title=\"DBView '$dbviewName'\">$text</a>"; 39 } 40 23 41 /** 24 42 * create a permalink to another dbview 25 43 * useful when creating PHP snippets. 44 * works only in dashboard. 45 * 26 46 * @param string$text 27 47 * @param string $sqlQuery which cannot contain " 28 48 */ 29 static function linkToView($text, $ name, $arg1=null, $arg2=null)49 static function linkToView($text, $dbviewName, $arg1=null, $arg2=null) 30 50 { 31 51 $args = "" ; 32 52 if (!empty($arg1)) $args .= "&arg1=".$arg1 ; 33 53 if (!empty($arg2)) $args .= "&arg2=".$arg2 ; 34 return "<a href=\"?page=dbview&name=$name$args\" title=\"DBView '$name'\">$text</a>"; 35 } 54 return "<a href=\"?page=dbview&name=$dbviewName$args\" title=\"DBView '$dbviewName'\">$text</a>"; 55 } 56 36 57 /** 37 58 * create a permalink to another database view with a query 59 * works only in dashboard. 38 60 * 39 61 * @param string$text
Note: See TracChangeset
for help on using the changeset viewer.