Skip to content

Instantly share code, notes, and snippets.

foreach ($toplinks as $link) {
$tag = "\t<li><a";
foreach ($link['attr'] as $attr => $value) {
$tag.= " ".htmlentities($attr)."=\"".htmlentities($value)."\"";
}
$tag.=">";
$tag.= htmlentities($link['content']);
$tag.="</a></li>\n";
echo $tag;
#1
$vars = array('plugin' => $this->name, 'subject' => 'show_page', 'action' => 'show_databases_extension');
$url = value_url(noEscape(url('plugin.php', $vars)), $vars);
#2
$link = array (
'url' => 'plugin.php',
@leonardosapiras
leonardosapiras / gist:1029110
Created June 16, 2011 12:07
Actions without printTable
./domains.php:217: echo "<td class=\"opbutton{$id}\">";
./info.php:64: echo "<td class=\"opbutton{$id}\"><a href=\"constraints.php?{$misc->href}",
./info.php:91: echo "<td class=\"opbutton{$id}\"><a href=\"tblproperties.php?{$misc->href}",
./info.php:118: echo "<td class=\"opbutton{$id}\"><a href=\"tblproperties.php?{$misc->href}",
./groups.php:83: echo "<td class=\"opbutton{$id}\"><a href=\"groups.php?action=confirm_drop_member&{$misc->href}&group=",
./display.php:547: echo "<td class=\"opbutton{$id}\"><a href=\"display.php?action=confeditrow&amp;strings=",
./display.php:550: echo "<td class=\"opbutton{$id}\"><a href=\"display.php?action=confdelrow&amp;strings=",
@leonardosapiras
leonardosapiras / gist:1029109
Created June 16, 2011 12:07
Action with printTable
./schemas.php:74: $misc->printTable($schemas, $columns, $actions, $lang['strnoschemas']);
./domains.php:430: $misc->printTable($domains, $columns, $actions, $lang['strnodomains']);
./all_db.php:428: $misc->printTable($databases, $columns, $actions, $lang['strnodatabases']);
./servers.php:82: $misc->printTable($servers, $columns, $actions, $lang['strnoobjects'], 'svPre');
./admin.php:656: $misc->printTable($autovac, $columns, $actions, $lang['strnovacuumconf']);
./triggers.php:332: $misc->printTable($triggers, $columns, $actions, $lang['strnotriggers'], 'tgPre');
./constraints.php:473: $misc->printTable($constraints, $columns, $actions, $lang['strnoconstraints'], 'cnPre');
./languages.php:46: $misc->printTable($languages, $columns, $actions, $lang['strnolanguages']);
./tables.php:828: $misc->printTable($tables, $columns, $actions, $lang['strnotables']);
./indexes.php:312: $misc->printTable($indexes, $columns, $actions, $lang['strnoindexes'], 'indPre');
//file a.php
function print_something() {
$x = function_where_this_function_was_called;
$y = file_where_this_function_was_called;
echo $x; //do_something
echo $y; //b.php
}
$navlinks = array (
array (
'attr'=> array ('href' => "views.php?action=create&amp;{$misc->href}"),
'content' => $lang['strcreateview']
), array (
'attr'=> array ('href' => "views.php?action=wiz_create&amp;{$misc->href}"),
'content' => $lang['strcreateviewwiz']
)
);
$misc->printNavLinks($navlinks);