/** * page code function */ function PageCompPageMainCode() { global $site; if ($_POST['DELETE']) { profile_delete($_COOKIE['memberID']); setcookie('memberID', $_COOKIE['memberID'], time() - 3600, '/'); setcookie('memberPassword', $_COOKIE['memberPassword'], time() - 3600, '/'); return "<center>" . _t("_DELETE_SUCCESS") . "<br />\n\t\t\t\t<a href=\"{$site['url']}\">{$site['title']}</a></center>"; } ob_start(); echo spacer(1, 5); ?> <table width="100%" cellpadding="4" cellspacing="4"> <td align="center" class="text2"> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post"> <input type="hidden" name="DELETE" value="1"> <center> <?php echo _t("_DELETE_TEXT"); ?> <br /><br /> <input class="no" type="submit" value="<?php echo _t("_Delete account"); ?> "> <br /> <br /> </center> </form> </td> </table> <?php $ret = ob_get_clean(); return $ret; }
function commonFooter($padding = true) { global $RIGHT_SIDEBAR_DATA; if ($padding) { print "<br />"; } ?> </td> </tr> </table> </td> <?php if (isset($RIGHT_SIDEBAR_DATA)) { ?> <td bgcolor="#CCCCCC" style="background-image: url(/gifs/checkerboard.gif)"><?php spacer(1, 1); ?> <br /></td> <td width="170" bgcolor="#F0F0F0"> <table width="100%" cellpadding="4" cellspacing="0"> <tr valign="top"> <td class="sidebar"> <?php echo $RIGHT_SIDEBAR_DATA; ?> </td> </tr> </table> </td> <?php } ?> </tr> </table> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#000033"><td><?php spacer(1, 1); ?> <br /></td></tr> <tr bgcolor="#006699"> <td align="right" valign="bottom"> <?php //print_link('/source.php?url='.$_SERVER['SCRIPT_NAME'], 'show source', false, 'class="menuWhite"'); //echo delim(); print_link('/credits.php', 'credits', false, 'class="menuWhite"'); ?> <br /> </td> </tr> <tr bgcolor="#000033"><td><?php spacer(1, 1); ?> <br /></td></tr> </table> <table border="0" cellspacing="0" cellpadding="6" width="100%"> <tr valign="top" bgcolor="#CCCCCC"> <td> <small> <?php print_link('http://www.php.net/', make_image('php-logo.gif', 'PHP', 'left')); ?> <?php print_link('/copyright.php', 'Copyright © 2001-' . date('Y') . ' The PHP Group'); ?> <br /> All rights reserved.<br /> </small> </td> <td align="right"> <small> Last updated: <?php echo strftime("%c %Z", getlastmod()); ?> <br /> </small> <br /> </td> </tr> </table> </body> </html> <?php }
//COUNTRY MENU //COUNTRY MENU case "SC": $CNT_TMP .= "<tr><td class=\"formLabel\" align=\"right\">" . must_filled($cfield[2]) . $cfield[3] . "</td><td>"; $CNT_TMP .= "<select name=\"" . $cfield[1] . "\" id=\"" . $cfield[1] . "\" class=\"selectMenu\""; $CNT_TMP .= ($cfield[6] ? " style=\"width:" . $cfield[6] . "px\"" : "") . ">\n"; $CNT_TMP .= list_country($cfield[5]); $CNT_TMP .= "</select></td></tr>\n"; break; // Captcha Image // Captcha Image case "CA": $CNT_TMP .= "<tr><td class=\"formLabel\" align=\"right\">" . must_filled($cfield[2]) . $cfield[3] . "</td><td>"; $CNT_TMP .= '<table cellpadding="0" cellspacing="0" border="0"><tr><td>'; $CNT_TMP .= "<input type=\"text\" name=\"" . $cfield[1] . "\" value=\"" . html_specialchars(trim($cfield[5])) . "\" size=\"" . $cfield_length . "\" "; $CNT_TMP .= $cfield_max_height ? "maxlength=\"" . $cfield_max_height . "\" " : ""; $CNT_TMP .= "id=\"" . $cfield[1] . "\" class=\"inputText\"" . ($cfield[6] ? " style=\"width:" . $cfield[6] . "px\"" : "") . " />"; $CNT_TMP .= "</td><td> </td><td>" . '<img src="img/captcha.php?regen=y&' . time() . '" alt="Captcha" />' . "</tr></table></td></tr>\n"; break; } } $CNT_TMP .= "<tr><td colspan=\"2\">" . spacer(1, 10) . "</td></tr>\n"; $CNT_TMP .= "<tr><td>" . spacer(1, 1) . "</td><td>" . $form_hidden_field; $CNT_TMP .= "<input type=\"submit\" name=\"submit\" value=\"" . html_specialchars(trim($cform[3])) . "\" class=\"formButton\" />"; $CNT_TMP .= "<input type=\"hidden\" name=\"subject\" value=\"" . $cform[1] . "\" />"; $CNT_TMP .= "<input type=\"hidden\" name=\"recipient\" value=\"" . $cform[2] . "\" />"; $CNT_TMP .= getFormTrackingValue(); $CNT_TMP .= sizeof($cfield_required) ? "<input type=\"hidden\" name=\"required\" value=\"" . implode(",", $cfield_required) . "\" />" : ""; $CNT_TMP .= "<input type=\"hidden\" name=\"type\" value=\"" . $cform[4] . "\" /></td></tr>\n"; $CNT_TMP .= "</table></form>\n"; }
$media["result"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]); $media["result"] .= "<div align=\"center\">" . $media["code"] . "</div>"; break; case 2: $media["result"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]); $media["result"] .= "<div align=\"right\">" . $media["code"] . "</div>"; break; case 3: $media["result"] .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\">\n"; $media["result"] .= "<tr><td colspan=\"2\">" . spacer(1, 3) . "</td></tr>\n"; $media["result"] .= $crow["acontent_title"] ? "<tr><td class=\"tableHead\">" . html_specialchars($crow["acontent_title"]) . "</td><td>" . spacer(5, 1) . "</td></tr>\n<tr><td colspan=\"2\">" . spacer(1, 3) . "</td></tr>\n" : ""; $media["result"] .= $crow["acontent_subtitle"] ? "<tr><td class=\"tableSubHead\">" . html_specialchars($crow["acontent_subtitle"]) . "</td><td>" . spacer(5, 1) . "</td></tr>\n<tr><td colspan=\"2\">" . spacer(1, 3) . "</td></tr>\n" : ""; $media["result"] .= "<tr><td>" . $media["code"] . "</td><td>" . spacer(5, 1) . "</td></tr>\n"; $media["result"] .= "<tr><td colspan=\"2\">" . spacer(1, 3) . "</td></tr>\n"; $media["result"] .= "</table>\n"; break; case 4: $media["result"] .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"right\">\n"; $media["result"] .= "<tr><td colspan=\"2\">" . spacer(1, 3) . "</td></tr>\n"; $media["result"] .= $crow["acontent_title"] ? "<tr><td>" . spacer(5, 1) . "</td><td class=\"tableHead\">" . html_specialchars($crow["acontent_title"]) . "</td></tr>\n<tr><td colspan=\"2\">" . spacer(1, 3) . "</td></tr>\n" : ""; $media["result"] .= $crow["acontent_subtitle"] ? "<tr><td>" . spacer(5, 1) . "</td><td class=\"tableSubHead\">" . html_specialchars($crow["acontent_subtitle"]) . "</td></tr>\n<tr><td colspan=\"2\">" . spacer(1, 3) . "</td></tr>\n" : ""; $media["result"] .= "<tr><td>" . spacer(5, 1) . "</td><td>" . $media["code"] . "</td></tr>\n"; $media["result"] .= "<tr><td colspan=\"2\">" . spacer(1, 3) . "</td></tr>\n"; $media["result"] .= "</table>\n"; break; } } else { $media["result"] = headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]); } $CNT_TMP .= LF . trim(render_cnt_template($crow["acontent_template"], 'MULTIMEDIA', trim($media["result"]))) . LF; unset($media);
function imagelisttable($imagelist, $rand = "0:0:0:0", $align = 0, $type = 0) { // build imagelist or ecard chooser table // image: type = 0 // ecard: type = 1 $template_type = $type ? 'ecard' : 'imagelist'; $usetable = !isset($imagelist['usetable']) || $imagelist['usetable'] ? true : false; if (empty($GLOBALS['cnt_image_lightbox'])) { $lightbox = 0; } else { $lightbox = generic_string(5); } $caption_on = empty($imagelist['nocaption']) ? true : false; $crop = empty($imagelist['crop']) ? 0 : 1; $image_border = ' border="' . (empty($GLOBALS["template_default"]["article"][$template_type . "_border"]) ? '0' : $GLOBALS["template_default"]["article"][$template_type . "_border"]) . '"'; if ($usetable) { $table_class = $GLOBALS["template_default"]["article"][$template_type . "_table_class"]; if (empty($align)) { $align = ''; } else { $table_class .= ' ' . $GLOBALS['template_default']['classes']['image-list-table'] . $align; $align = ' align="' . $align . '"'; } $table_class = ' class="' . trim($table_class) . '"'; $table_bgcolor = empty($GLOBALS["template_default"]["article"][$template_type . "_table_bgcolor"]) ? '' : ' bgcolor="' . $GLOBALS["template_default"]["article"][$template_type . "_table_bgcolor"] . '"'; $image_align = empty($GLOBALS["template_default"]["article"][$template_type . "_align"]) ? '' : ' align="' . $GLOBALS["template_default"]["article"][$template_type . "_align"] . '"'; $image_valign = empty($GLOBALS["template_default"]["article"][$template_type . "_valign"]) ? '' : ' valign="' . $GLOBALS["template_default"]["article"][$template_type . "_valign"] . '"'; $image_class = empty($GLOBALS["template_default"]["article"][$template_type . "_class"]) ? '' : ' class="' . $GLOBALS["template_default"]["article"][$template_type . "_class"] . '"'; $image_bgcolor = empty($GLOBALS["template_default"]["article"][$template_type . "_bgcolor"]) ? '' : ' bgcolor="' . $GLOBALS["template_default"]["article"][$template_type . "_bgcolor"] . '"'; $caption_class = empty($GLOBALS["template_default"]["article"][$template_type . "_caption_class"]) ? '' : ' class="' . $GLOBALS["template_default"]["article"][$template_type . "_caption_class"] . '"'; $caption_bgcolor = empty($GLOBALS["template_default"]["article"][$template_type . "_caption_bgcolor"]) ? '' : ' bgcolor="' . $GLOBALS["template_default"]["article"][$template_type . "_caption_bgcolor"] . '"'; $caption_valign = empty($GLOBALS["template_default"]["article"][$template_type . "_caption_valign"]) ? '' : ' valign="' . $GLOBALS["template_default"]["article"][$template_type . "_caption_valign"] . '"'; $caption_align = empty($GLOBALS["template_default"]["article"][$template_type . "_caption_align"]) ? '' : ' align="' . $GLOBALS["template_default"]["article"][$template_type . "_caption_align"] . '"'; $image_imgclass = empty($GLOBALS["template_default"]["article"][$template_type . "_imgclass"]) ? '' : ' class="' . $GLOBALS["template_default"]["article"][$template_type . "_imgclass"] . '"'; $capt_before = $GLOBALS["template_default"]["article"][$template_type . "_caption_before"]; $capt_after = $GLOBALS["template_default"]["article"][$template_type . "_caption_after"]; } else { $image_imgclass = ' class="' . $imagelist['class_image_thumb'] . '"'; } $rand = explode(":", $rand); if (count($rand)) { foreach ($rand as $key => $value) { $rand[$key] = intval($value); } } else { $rand = array(0, 0, 0, 0); } $col_rand = $rand[2] && $rand[3] ? 2 : ($rand[2] || $rand[3] ? 1 : 0); if ($count_images = count($imagelist['images'])) { // randomize image if (!empty($imagelist['random'])) { shuffle($imagelist['images']); } if (empty($imagelist['limit'])) { $imagelist['limit'] = 0; } //Tabelle starten $table = LF; if ($usetable) { $table .= ' <table border="0" cellspacing="0" cellpadding="0"' . $align . $table_bgcolor . $table_class . ' summary="">' . LF; } else { $table .= ' <div class="'; if (empty($imagelist['class'])) { $table .= 'image-table'; } else { $table .= $imagelist['class']; } $table .= '">' . LF; } $x = 0; $y = 0; $z = 0; foreach ($imagelist['images'] as $key => $value) { if (isset($imagelist['width'])) { $imagelist['images'][$key][4] = $imagelist['width']; $imagelist['images'][$key][5] = $imagelist['height']; } $y++; if ($usetable && $z && $x == 1) { if ($col_space) { $table .= LF . '<tr>' . LF . ' <td'; $table .= $col_total > 1 ? " colspan=\"" . $col_total . "\"" : ""; if (!empty($GLOBALS["template_default"]['article']['imagelist_spacerrow_class'])) { $table .= ' class="' . $GLOBALS["template_default"]['article']['imagelist_spacerrow_class'] . '">'; $table .= spacer(1, 1) . '</td>' . LF . '</tr>' . LF; } else { $table .= '>' . spacer(1, $col_space) . '</td>' . LF . '</tr>' . LF; } } } if ($usetable && !$x) { //Some default values $col_space = $imagelist['space']; //Space between images $col_count = $imagelist['col']; //columns $col_total = $col_count + ($col_space ? $col_count - 1 : 0) + $col_rand; //Wenn oberer Rand definiert if ($rand[0]) { $table .= '<tr>' . LF . ' <td' . ($col_total > 1 ? ' colspan="' . $col_total . '"' : '') . '>' . spacer(1, $rand[0]) . '</td>' . LF . '</tr>' . LF; } $x = 1; } if ($usetable && $x == 1) { // if left border $table_tmp = $rand[2] ? ' <td width="' . $rand[2] . '">' . spacer($rand[2], 1) . '</td>' . LF : ''; //Neue Tabellenzeile $capt_tmp = ''; $capt_row = '<tr>' . LF . $table_tmp; if ($caption_on) { $table .= $capt_row; } else { $table .= '<tr>' . LF; } } //Aktuelle Bildspalte ausgeben if ($usetable) { $table .= ' <td' . $image_align . $image_valign . $image_bgcolor . $image_class . '>'; } else { if (!$x) { $x = 1; } $table .= ' <div class="' . $imagelist['class_image_wrapper']; if ($x === 1) { $table .= ' first'; } $table .= ' row-' . ($z + 1); $table .= '">' . LF . ' '; } $thumb_image = get_cached_image(array("target_ext" => $imagelist['images'][$key][3], "image_name" => $imagelist['images'][$key][2] . '.' . $imagelist['images'][$key][3], "max_width" => $imagelist['images'][$key][4], "max_height" => $imagelist['images'][$key][5], "thumb_name" => md5($imagelist['images'][$key][2] . $imagelist['images'][$key][4] . $imagelist['images'][$key][5] . $GLOBALS['phpwcms']["sharpen_level"] . $crop . $GLOBALS['phpwcms']['colorspace']), 'crop_image' => $crop)); if ($thumb_image && $imagelist['zoom']) { $zoominfo = get_cached_image(array("target_ext" => $imagelist['images'][$key][3], "image_name" => $imagelist['images'][$key][2] . '.' . $imagelist['images'][$key][3], "max_width" => $GLOBALS['phpwcms']["img_prev_width"], "max_height" => $GLOBALS['phpwcms']["img_prev_height"], "thumb_name" => md5($imagelist['images'][$key][2] . $GLOBALS['phpwcms']["img_prev_width"] . $GLOBALS['phpwcms']["img_prev_height"] . $GLOBALS['phpwcms']["sharpen_level"] . $GLOBALS['phpwcms']['colorspace']))); } // now try to build caption and if neccessary add alt to image or set external link for image $caption = getImageCaption($imagelist['images'][$key][6]); // set caption and ALT Image Text for imagelist $capt_cur = !$type ? html_specialchars($caption[0]) : $caption[0]; $caption[3] = empty($caption[3]) ? '' : ' title="' . html_specialchars($caption[3]) . '"'; //title $caption[1] = empty($caption[1]) ? html_specialchars($imagelist['images'][$key][1]) : html_specialchars($caption[1]); $list_img_temp = '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" ' . $thumb_image[3] . $image_border . $image_imgclass; $list_img_temp .= ' data-image-id="' . $imagelist['images'][$key][0] . '" data-image-hash="' . $imagelist['images'][$key][2] . '"'; $list_img_temp .= ' data-image-ext="' . $imagelist['images'][$key][3] . '"'; $list_img_temp .= ' alt="' . $caption[1] . '"' . $caption[3] . ' />'; if ($imagelist['zoom'] && isset($zoominfo) && $zoominfo != false) { // if click enlarge the image $open_popup_link = 'image_zoom.php?' . getClickZoomImageParameter($zoominfo[0] . '?' . $zoominfo[3]); if ($caption[2][0]) { $open_link = $caption[2][0]; $return_false = ''; } else { $open_link = $open_popup_link; $return_false = 'return false;'; } if (!$lightbox || $caption[2][0]) { $table .= "<a href=\"" . $open_link . "\" onclick=\"checkClickZoom();clickZoom('" . $open_popup_link . "','previewpic','width="; $table .= $zoominfo[1] . ",height=" . $zoominfo[2] . "');" . $return_false . '"' . $caption[2][1] . ' class="' . $imagelist['class_image_zoom'] . '">'; } else { // lightbox $table .= '<a href="' . PHPWCMS_IMAGES . $zoominfo[0] . '" rel="lightbox[' . $lightbox . ']"'; if ($capt_cur) { $table .= ' title="' . parseLightboxCaption($capt_cur) . '"'; } $table .= ' class="' . $imagelist['class_image_lightbox'] . '">'; } $table .= $list_img_temp . "</a>"; } else { // if not click enlarge if ($caption[2][0]) { $table .= '<a href="' . $caption[2][0] . '"' . $caption[2][1] . ' class="' . $imagelist['class_image_link'] . '">' . $list_img_temp . '</a>'; } else { $table .= $list_img_temp; } } if ($usetable) { $table .= '</td>' . LF; if ($caption_on && $capt_cur) { $capt_tmp .= $capt_cur; $capt_cur = '<span style="width:' . $thumb_image[1] . 'px">' . $capt_cur . '</span>'; } else { $capt_cur = ' '; } $capt_row .= ' <td' . $caption_valign . $caption_align . $caption_bgcolor . $caption_class . '>' . $capt_before . $capt_cur . $capt_after . '</td>' . LF; } else { if ($caption_on && $capt_cur) { $caption_class = empty($GLOBALS["template_default"]["article"]["image_caption_class"]) ? 'caption' : $GLOBALS["template_default"]["article"]["image_caption_class"]; $table .= LF . ' <p style="width:' . $thumb_image[1] . 'px" class="' . $caption_class . '">' . $GLOBALS["template_default"]["article"]["image_caption_before"]; $table .= $capt_cur; if ($caption[4] !== '') { $table .= ' <span class="' . $GLOBALS['template_default']['classes']['copyright'] . '">' . html_specialchars($caption[4]) . '</span>'; } $table .= $GLOBALS["template_default"]["article"]["image_caption_after"] . "</p>"; } $table .= LF . ' </div>' . LF; } //Gegenchecken wieviele Tabellenspalten als Rest bleiben und ergänzen if ($usetable) { if ($y == $count_images && $col_count > 1) { //wenn eigentlich alle Bilder durchlaufen sind if ($col_space && $x < $col_count) { $xct = ' <td>' . spacer($col_space, 1) . '</td>' . LF; $table .= $xct; $capt_row .= $xct; } $rest_image = ceil($count_images / $col_count) * $col_count - $count_images; for ($i = 1; $i <= $rest_image; $i++) { $table .= ' <td> </td>'; $capt_row .= ' <td> </td>'; if ($i < $rest_image) { if ($col_space) { $xct = ' <td width="' . $col_space . '">' . spacer($col_space, 1) . '</td>' . LF; $table .= $xct; $capt_row .= $xct; } } $x++; } } if ($x == $col_count) { //Wenn maximale Anzahl Bildspalten erreicht $xct = $rand[3] ? '<td width="' . $rand[3] . '">' . spacer($rand[3], 1) . '</td>' . LF : ''; $table .= $xct; $capt_row .= $xct; $table .= "</tr>" . LF; $capt_row .= "</tr>" . LF; if ($capt_tmp) { if ($caption_on) { $table .= $capt_row; } $capt_row = ''; $capt_tmp = ''; } $x = 1; $z++; } else { $xct = $col_space ? ' <td width="' . $col_space . '">' . spacer($col_space, 1) . '</td>' . LF : ''; $table .= $xct; $capt_row .= $xct; $x++; } } else { if ($x == $imagelist['col']) { $x = 0; $z++; } else { $x++; } } // end if max image count if ($imagelist['limit'] == $y) { break; } } if ($usetable) { if ($rand[1]) { $table .= '<tr>' . LF . ' <td' . ($col_total > 1 ? " colspan=\"" . $col_total . "\"" : "") . ">" . spacer(1, $rand[1]) . '</td>' . LF . '</tr>' . LF; } $table .= ' </table>' . LF; } else { $table .= ' </div>' . LF; } } return $table; }
function system_packages() { $sock = new sockets(); $users = new usersMenus(); $KASPERSKY_APPLIANCE = FALSE; if ($users->KASPERSKY_SMTP_APPLIANCE) { $KASPERSKY_APPLIANCE = TRUE; } if ($users->KASPERSKY_WEB_APPLIANCE) { $KASPERSKY_APPLIANCE = TRUE; } if ($users->OPENVPN_APPLIANCE) { $OPENVPN_APPLIANCE = TRUE; } $MEM_TOTAL_INSTALLEE = $users->MEM_TOTAL_INSTALLEE; $GlobalApplicationsStatus = $sock->APC_GET("GlobalApplicationsStatus", 2); if ($GlobalApplicationsStatus == null) { $GlobalApplicationsStatus = base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes')); $sock->APC_SAVE("GlobalApplicationsStatus", $GlobalApplicationsStatus); } $html = "\n\n<br>\n<table style='width:100%;padding:2px:margin:3px;border:1px solid #CCCCCC'>\n<tr style='background-color:#CCCCCC'>\n<td> </td>\n<td style='font-size:13px'><strong>{software}</strong></td>\n<td style='font-size:13px'><strong>{current_version}</strong></td>\n<td style='font-size:13px'><strong>{available_version}</strong></td>\n<td style='font-size:13px'> </td>\n<td style='font-size:13px'><strong>{status}</strong></td>\n</tr>"; if ($users->VMWARE_HOST) { $html = $html . BuildRows("APP_VMTOOLS", $GlobalApplicationsStatus, "VMwareTools"); } if ($users->VIRTUALBOX_HOST) { $html = $html . BuildRows("APP_VBOXADDITIONS", $GlobalApplicationsStatus, "VBoxLinuxAdditions-{$users->ArchStruct}"); } if ($users->LinuxDistriCode == 'DEBIAN' or $users->LinuxDistriCode == 'UBUNTU') { $html = $html . BuildRows("APP_OPENLDAP", $GlobalApplicationsStatus, "openldap"); } //if(!$users->AS_VPS_CLIENT){$html=$html.BuildRows("APP_MYSQL",$GlobalApplicationsStatus,"mysql-cluster-gpl");} if (!$KASPERSKY_APPLIANCE) { if ($MEM_TOTAL_INSTALLEE > 700000) { if (!$users->AS_VPS_CLIENT) { $html = $html . BuildRows("APP_LXC", $GlobalApplicationsStatus, "lxc"); } } } $html = $html . BuildRows("APP_PHPLDAPADMIN", $GlobalApplicationsStatus, "phpldapadmin"); $html = $html . BuildRows("APP_MYSQL", $GlobalApplicationsStatus, "mysql-server"); $html = $html . BuildRows("APP_PHPMYADMIN", $GlobalApplicationsStatus, "phpMyAdmin"); if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_GREENSQL", $GlobalApplicationsStatus, "greensql-fw"); } if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_TOMCAT", $GlobalApplicationsStatus, "apache-tomcat"); } //$html=$html.BuildRows("APP_EACCELERATOR",$GlobalApplicationsStatus,"eaccelerator"); if (!$KASPERSKY_APPLIANCE) { $html = $html . spacer('{smtp_packages}'); $html = $html . BuildRows("APP_MSMTP", $GlobalApplicationsStatus, "msmtp"); if ($MEM_TOTAL_INSTALLEE > 500000) { $html = $html . BuildRows("APP_EMAILRELAY", $GlobalApplicationsStatus, "emailrelay"); } } $html = $html . spacer('{network_softwares}'); if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_DHCP", $GlobalApplicationsStatus, "dhcp"); } if (!$KASPERSKY_APPLIANCE) { if ($MEM_TOTAL_INSTALLEE > 700000) { $html = $html . BuildRows("APP_PDNS", $GlobalApplicationsStatus, "pdns"); } } if (!$KASPERSKY_APPLIANCE) { if ($MEM_TOTAL_INSTALLEE > 700000) { $html = $html . BuildRows("APP_POWERADMIN", $GlobalApplicationsStatus, "poweradmin"); } } if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_OPENVPN", $GlobalApplicationsStatus, "openvpn"); } $html = $html . BuildRows("APP_IPTACCOUNT", $GlobalApplicationsStatus, "iptaccount"); if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_AMACHI", $GlobalApplicationsStatus, "hamachi"); } if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_PUREFTPD", $GlobalApplicationsStatus, "pure-ftpd"); } if (!$KASPERSKY_APPLIANCE) { if (!$OPENVPN_APPLIANCE) { $html = $html . BuildRows("APP_MLDONKEY", $GlobalApplicationsStatus, "mldonkey"); } } if (!$KASPERSKY_APPLIANCE) { if (!$OPENVPN_APPLIANCE) { $html = $html . spacer('{storagebakcup_softwares}'); $html = $html . BuildRows("APP_AMANDA", $GlobalApplicationsStatus, "amanda"); $html = $html . BuildRows("APP_DROPBOX", $GlobalApplicationsStatus, "dropbox-32"); $html = $html . BuildRows("APP_FUSE", $GlobalApplicationsStatus, "fuse"); $html = $html . BuildRows("APP_ZFS_FUSE", $GlobalApplicationsStatus, "zfs-fuse"); $html = $html . BuildRows("APP_TOKYOCABINET", $GlobalApplicationsStatus, "tokyocabinet"); $html = $html . BuildRows("APP_LESSFS", $GlobalApplicationsStatus, "lessfs"); if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_DAR", $GlobalApplicationsStatus, "dar"); } } } if (!$KASPERSKY_APPLIANCE) { $html = $html . spacer('{secuirty_softwares}'); if ($MEM_TOTAL_INSTALLEE > 700000) { $html = $html . BuildRows("APP_CLAMAV", $GlobalApplicationsStatus, "clamav"); } $html = $html . BuildRows("APP_SNORT", $GlobalApplicationsStatus, "snort"); $html = $html . BuildRows("APP_NMAP", $GlobalApplicationsStatus, "nmap"); $html = $html . BuildRows("APP_SMARTMONTOOLS", $GlobalApplicationsStatus, "smartmontools"); if (!$OPENVPN_APPLIANCE) { $html = $html . spacer('{computers_management}'); $html = $html . BuildRows("APP_WINEXE", $GlobalApplicationsStatus, "winexe-static"); $html = $html . BuildRows("APP_OCSI", $GlobalApplicationsStatus, "OCSNG_UNIX_SERVER"); $html = $html . BuildRows("APP_OCSI2", $GlobalApplicationsStatus, "OCSNG_UNIX_SERVER2"); $html = $html . BuildRows("APP_OCSI_LINUX_CLIENT", $GlobalApplicationsStatus, "OCSNG_LINUX_AGENT"); } } if (!$KASPERSKY_APPLIANCE) { if (!$OPENVPN_APPLIANCE) { $html = $html . spacer('{xapian_packages}'); $html = $html . BuildRows("APP_XAPIAN", $GlobalApplicationsStatus, "xapian-core"); $html = $html . BuildRows("APP_XAPIAN_OMEGA", $GlobalApplicationsStatus, "xapian-omega"); $html = $html . BuildRows("APP_XAPIAN_PHP", $GlobalApplicationsStatus, "xapian-bindings"); $html = $html . BuildRows("APP_XPDF", $GlobalApplicationsStatus, "xpdf"); //$html=$html.BuildRows("APP_UNZIP",$GlobalApplicationsStatus,"unzip"); $html = $html . BuildRows("APP_UNRTF", $GlobalApplicationsStatus, "unrtf"); $html = $html . BuildRows("APP_CATDOC", $GlobalApplicationsStatus, "catdoc"); $html = $html . BuildRows("APP_ANTIWORD", $GlobalApplicationsStatus, "antiword"); } } $html = $html . "</table>"; if (posix_getuid() == 0) { file_put_contents(dirname(__FILE__) . "/ressources/logs/setup.index." . __FUNCTION__ . ".html", $html); return null; } $tpl = new templates(); return $tpl->_ENGINE_parse_body($html); }
function response_header($title = 'The PHP Extension Community Library', $style = false) { global $_style, $_header_done, $SIDEBAR_DATA, $extra_styles, $auth_user; if ($_header_done) { return; } $_header_done = true; $_style = $style; $rts = rtrim($SIDEBAR_DATA); if (substr($rts, -1) == '-') { $SIDEBAR_DATA = substr($rts, 0, -1); } else { global $main_menu, $docu_menu, $downloads_menu; $SIDEBAR_DATA .= draw_navigation($main_menu); $SIDEBAR_DATA .= draw_navigation($docu_menu, 'Documentation:'); $SIDEBAR_DATA .= draw_navigation($downloads_menu, 'Downloads:'); if (!$GLOBALS['_NODB']) { init_auth_user(); } else { $auth_user = null; } if (is_logged_in()) { global $developer_menu; $SIDEBAR_DATA .= draw_navigation($developer_menu, 'Developers:'); if (auth_check(true)) { global $admin_menu; $SIDEBAR_DATA .= draw_navigation($admin_menu, 'Administrators:'); } } } echo '<?xml version="1.0" encoding="ISO-8859-1" ?>'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>PECL :: <?php echo $title; ?> </title> <link rel="shortcut icon" href="/gifs/pecl-favicon.ico" /> <link rel="stylesheet" href="/css/style.css" /> <?php foreach ($extra_styles as $style_file) { echo ' <link rel="stylesheet" href="' . $style_file . "\" />\n"; } ?> <link rel="alternate" type="application/rss+xml" title="RSS feed" href="http://<?php echo $_SERVER['HTTP_HOST']; ?> /feeds/latest.rss" /> </head> <body <?php if (!empty($GLOBALS['ONLOAD'])) { print "onload=\"" . $GLOBALS['ONLOAD'] . "\""; } ?> > <div> <a id="TOP"></a> </div> <!-- START HEADER --> <table class="head" cellspacing="0" cellpadding="0" width="100%"> <tr> <td class="head-logo"> <?php print_link('/', make_image('peclsmall.gif', 'PECL :: The PHP Extension Community Library', false, false, false, false, 'margin: 5px;')); ?> <br /> </td> <td class="head-menu"> <?php if (empty($auth_user)) { print_link('/login.php', 'Login', false, 'class="menuBlack"'); } else { print '<small class="menuWhite">'; print 'Logged in as ' . strtoupper($auth_user->handle) . ' ('; print '<a class="menuWhite" href="/user/' . $auth_user->handle . '">Info</a> | '; print '<a class="menuWhite" href="/account-edit.php?handle=' . $auth_user->handle . '">Profile</a> | '; print '<a class="menuWhite" href="https://bugs.php.net/search.php?cmd=display&status=Open&assign=' . $auth_user->handle . '">Bugs</a>'; print ")</small><br />\n"; print_link('/?logout=1', 'Logout', false, 'class="menuBlack"'); } echo delim(); print_link('/packages.php', 'Packages', false, 'class="menuBlack"'); echo delim(); print_link('/support.php', 'Support', false, 'class="menuBlack"'); echo delim(); print_link('/bugs/', 'Bugs', false, 'class="menuBlack"'); ?> <br /> <?php spacer(2, 2); ?> <br /> </td> </tr> <tr> <td class="head-search" colspan="2"> <form method="post" action="/search.php"> <p class="head-search"><span class="accesskey">S</span>earch for <input class="small" type="text" name="search_string" value="" size="20" accesskey="s" /> in the <select name="search_in" class="small"> <option value="packages">Packages</option> <option value="site">This site (using Google)</option> <option value="developers">Developers</option> <option value="pecl-dev">Developer mailing list</option> <option value="pecl-cvs">SVN commits mailing list</option> </select> <input type="image" src="/gifs/small_submit_white.gif" alt="search" style="vertical-align: middle;" /> <br /> </p> </form> </td> </tr> </table> <!-- END HEADER --> <!-- START MIDDLE --> <table class="middle" cellspacing="0" cellpadding="0"> <tr> <?php if (isset($SIDEBAR_DATA)) { ?> <!-- START LEFT SIDEBAR --> <td class="sidebar_left"> <?php echo $SIDEBAR_DATA; ?> </td> <!-- END LEFT SIDEBAR --> <?php } ?> <!-- START MAIN CONTENT --> <td class="content"> <?php }
} else { echo statikHTML("5. İş Deneyimi", null); } echo "<br />"; $titles = array("6. Yabancı Dil Bilgisi", "Yabancı Dil", "Okuma", "Konuşma", "Yazma", "Anlama"); $tableIds = array("DIL_ADI", "DIL_DERECESI"); $dilA = getPersonelArr($dil, $tableIds, 1); $tableIds = array("DIL_ADI", "DIL_DERECESI_1", "DIL_DERECESI_2", "DIL_DERECESI_3", "DIL_DERECESI_4"); if (isset($dilA[$i])) { echo tabloHTML($titles, $tableIds, $dilA[$i]); } else { echo statikHTML("6. Yabancı Dil Bilgisi", null); } echo "<br />"; if ($i < count($personel) - 1) { echo spacer(); echo "<br />"; } } } ?> </div> <div class="form_element"> <div style="padding-bottom:10px;"> <input type='button' name='geriUst' value='Geri' onClick='formSubmitted(1);'/> <input type='button' name='bitirUst' value='Bitir' onClick='formSubmitted(2);'/> </div> </div> </form>
} if (!$mm) { $mm = $today['mon']; } } $yyyy = (int) $yyyy; $mm = (int) $mm; $f = @file("./calendar/{$yyyy}.txt"); if ($f) { while ($line = each($f)) { $tmp = explode("|", $line[value]); $nal[$tmp[0]] = $tmp; //print_r2($nal); } } $spacer = spacer($yyyy, $mm); $endday = array(1 => 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); // 윤년 계산 부분이다. 4년에 한번꼴로 2월이 28일이 아닌 29일이 있다. if ($yyyy % 4 == 0 && $yyyy % 100 != 0 || $yyyy % 400 == 0) { $endday[2] = 29; } // 조건에 적합할 경우 28을 29로 변경 // 해당월의 1일 $mktime = mktime(0, 0, 0, $mm, 1, $yyyy); $dt = getdate(strtotime(date("Y-m-1", $mktime))); $dt[wday] = $spacer; // 해당월의 마지막 날짜, //$last_day = date("t", $mktime); $last_day = $endday[$mm]; $yyyy_before = $yyyy; $mm_before = $mm - 1;
function navigationBar($title, $id, $loc) { global $NEXT, $PREV, $tstamp, $CHARSET; echo '<table border="0" width="620" bgcolor="#e0e0e0" cellpadding="0" cellspacing="4">'; echo '<tr><td>'; if ($PREV[1]) { print_link($PREV[0], make_image('caret-l.gif', 'previous') . @htmlspecialchars($PREV[1], ENT_QUOTES, $CHARSET)); } echo '<br /></td>'; echo '<td align="right">'; if ($NEXT[1]) { print_link($NEXT[0], @htmlspecialchars($NEXT[1], ENT_QUOTES, $CHARSET) . make_image('caret-r.gif', 'next')); } echo '<br /></td>'; echo '</tr>'; echo '<tr bgcolor="#cccccc"><td colspan="2">'; spacer(1, 1); echo '<br /></td></tr>'; if ($loc != 'bottom') { global $LANGUAGES; $links = array(); foreach ($LANGUAGES as $code => $name) { if (file_exists("../{$code}/{$id}")) { $links[] = make_link("../{$code}/{$id}", $name); } } $file = substr($id, 0, -4); if (file_exists("html/{$file}.html")) { $links[] = make_link("html/{$file}.html", 'Plain HTML'); } echo '<tr>'; if (count($links)) { echo '<td><small>View this page in ' . join(delim(), $links) . '</small></td>'; } echo '<td align="right"><small>Last updated: ' . $tstamp . '</small></td></tr>'; } else { echo '<tr>'; echo '<td valign="top" align="left"><small>' . make_link("/download-docs.php", "Download Documentation") . '</small</td>'; echo '<td align="right"><small>Last updated: ' . $tstamp . '<br />'; } echo '</small></td></tr>'; echo "</table>\n"; }
function listing_page($message = null) { global $self, $directory, $sort, $reverse; html_header(); $list = getlist($directory); if (array_key_exists('sort', $_GET)) { $sort = $_GET['sort']; } else { $sort = 'filename'; } if (array_key_exists('reverse', $_GET) && $_GET['reverse'] == 'true') { $reverse = true; } else { $reverse = false; } $list = sortlist($list, $sort, $reverse); echo '<h1 style="margin-bottom: 0">Web File Browser (webadmin.php)</h1> <form enctype="multipart/form-data" action="' . $self . '" method="post"> <table id="main"> '; directory_choice(); if (!empty($message)) { spacer(); echo $message; } if (@is_writable($directory)) { upload_box(); create_box(); } else { spacer(); } if ($list) { listing($list); } else { echo error('not_readable', $directory); } echo '</table> </form> '; html_footer(); }
$s = "čšžčk"; //$s is a string from whatever source //mb_detect_encoding($s, "UTF-8") == "UTF-8" ? : $s = utf8_encode($s); //$s = iconv("UTF-8//TRANSLIT", "iso-8859-2", $s); utf8_encode($s); ///koliko bomo pomaknili vse v desno// $XOF = 26; $LN_DEFAULT = 4; //Instanciation of inherited class $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); //$pdf->AddFont('luxisb','','luxisb.php'); $pdf->AddFont('Arial', '', 'Arial.php'); $pdf->SetFont('Arial', '', 8); //Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]]) //NAziv in sedez $pdf->SetXY($XOF + 35, 29); $pdf->Cell(0, 0, "Root d.o.o., cesta v {$s} 10 3320 velenje", 0, 0, 'L'); //$pdf->MultiCell(65, 4,'sss', '', 'TL',0); $pdf->Ln($LN_DEFAULT); $pdf->SetXY($XOF + 22, $pdf->getY()); //napisemo davcno// $pdf->Cell(0, 0, spacer("2005977500396", 4), 0, 0, 'L'); //nova vrsta $pdf->Ln($LN_DEFAULT); $pdf->SetXY($XOF + 30, $pdf->getY()); //gospodarska dejavnost// $pdf->Cell(0, 0, 'Struzenje in gledanje', 0, 0, 'L'); //output of the PDF// $pdf->Output("test.pdf", "I");
if (strtolower(p('username')) == strtolower(schlage_username()) && p('password') == schlage_password()) { success('Welcome back!'); s('logged_in', 1); r('/users'); } else { error('Invalid login'); } } top(); form(); func('login'); label('Username'); textfield('username'); label('Password'); password('password'); label(); submit('Log in'); spacer(); endform(); bottom(); ?>
$content["all"] .= td_attributes($pagelayout, "all", 0); $content["all"] .= align_base_layout($pagelayout["layout_align"]) . " summary=\"\">" . LF; // align table //header $content["all"] .= colspan_table_row($pagelayout, "header", $colspan, $block["headertext"]); //header row if ($pagelayout["layout_topspace_height"]) { //header space $content["all"] .= colspan_table_row($pagelayout, "topspace", $colspan, spacer(1, $pagelayout["layout_topspace_height"])); } //returns the main blocks: left column, content column, right column $content["all"] .= get_table_block($pagelayout, $block["maintext"], $block["lefttext"], $block["righttext"]); //footer if ($pagelayout["layout_bottomspace_height"]) { //bottom space $content["all"] .= colspan_table_row($pagelayout, "bottomspace", $colspan, spacer(1, $pagelayout["layout_bottomspace_height"])); } $content["all"] .= colspan_table_row($pagelayout, "footer", $colspan, $block["footertext"]); //footer row $content["all"] .= '</table>' . LF; //end main table break; case 1: //create the page layout based on DIV (layer) //contentContainer DIV start $content["all"] = ''; $pagelayout['additional_wrap_div'] = false; switch ($pagelayout["layout_align"]) { case 1: $content["all"] .= '<div align="center" style="margin:0;padding:0;">'; $pagelayout['additional_wrap_div'] = true;
// // //$text = iconv("iso-8859-1", "iso-8859-2", $SUMNIKI); //test Šumnikov ///koliko bomo pomaknili vse v desno// $XOF = 26; $LN_DEFAULT = 5; //Instanciation of inherited class $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->Image('img/obrazec.jpg', 0, 0, 197, 297); //$pdf->AddFont('luxisb','','luxisb.php'); $pdf->AddFont('Arial', '', 'Arial.php'); $pdf->SetFont('Arial', '', 8); //Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]]) //NAziv in sedez $pdf->SetXY($XOF + 35, 15); $pdf->Cell(0, 0, "Root d.o.o., cesta v {$text} 10 3320 velenje", 0, 0, 'L'); //$pdf->MultiCell(65, 4,'sss', '', 'TL',0); $pdf->Ln($LN_DEFAULT); $pdf->SetXY($XOF + 13, $pdf->getY()); //napisemo davcno// $pdf->Cell(0, 0, spacer("123456789123", 4, 3), 0, 0, 'L'); //nova vrsta $pdf->Ln($LN_DEFAULT); $pdf->SetXY($XOF + 30, $pdf->getY()); //gospodarska dejavnost// $pdf->Cell(0, 0, 'Struzenje in gledanje', 0, 0, 'L'); //output of the PDF// $pdf->Output("test.pdf", "I");
<?php function spacer($fact, $words = array()) { // Let's display the name and the fact correctly if (empty($words)) { $words = array("'"); // More to come as example present themselves. } $clean_words = array_map('preg_quote', $words); return preg_match('/^\\s*(' . join('|', $clean_words) . ')/', $fact) ? $fact : ' ' . $fact; } $fact1 = 'has awesome pants'; $fact2 = '\'s pants are awesome'; $user = '******'; echo $user . spacer($fact1); echo "\n" . $user . spacer($fact2); ?> This is some example text <html> <head> <title>TEST!!!</title> </head> <body>WTF?</body> </html>
if (is_numeric($nlvalue)) { continue; } $content["newsletter"]['t'] .= '<tr>' . LF . '<td><input name="email_subscription[' . $nlkey . ']" type="checkbox" value="' . $nlkey . '"'; if (isset($content["newsletter"]["email_subscription"][$nlkey])) { $content["newsletter"]['t'] .= ' checked="checked"'; } $content["newsletter"]['t'] .= ' id="email_subscription_' . $nlkey . '"/></td>' . LF; $content["newsletter"]['t'] .= '<td><label for="email_subscription_' . $nlkey . '">'; $content["newsletter"]['t'] .= html_specialchars($nlvalue); $content["newsletter"]['t'] .= '</label></td>' . LF . '</tr>' . LF; $content["newsletter"]['c']++; } if ($content["newsletter"]['c']) { $CNT_TMP .= "<tr>\n<td valign=\"top\" class=\"formLabel subscriptions\">"; $CNT_TMP .= empty($content["newsletter"]["label_subscriptions"]) ? 'subscribe to:' : $content["newsletter"]["label_subscriptions"]; $CNT_TMP .= ' </td>' . $label_pos_tr . '<td valign="top">'; $CNT_TMP .= '<table border="0" cellpadding="0" cellspacing="0" class="subscriptions">' . LF; $CNT_TMP .= $content["newsletter"]['t']; $CNT_TMP .= "</table></td>\n</tr>\n"; } } $CNT_TMP .= '<tr><td' . $label_pos_colspan . '>' . spacer(1, 3) . "</td></tr>\n<tr>"; if (!$label_pos) { $CNT_TMP .= "\n<td> </td>"; } $CNT_TMP .= "<td><input name=\"submit\" type=\"submit\" class=\"formButton\" value=\""; $CNT_TMP .= ($content["newsletter"]["button_text"] ? $content["newsletter"]["button_text"] : "send") . "\" />"; $CNT_TMP .= '<input name="newsletter_send" type="hidden" value="1" />'; $CNT_TMP .= "</td>\n</tr>\n</table></form>"; }
include PHPWCMS_ROOT . "/include/inc_front/content/cnt" . $crow["acontent_type"] . ".article.inc.php"; } elseif ($crow["acontent_type"] == 30 && is_file($phpwcms['modules'][$crow["acontent_module"]]['path'] . 'inc/cnt.article.php')) { if ($content['article_frontend_edit']) { $CNT_TMP .= getFrontendEditLink('module', $phpwcms['modules'][$crow["acontent_module"]]['name'], $crow['acontent_aid']); } // now try to include module content part code include $phpwcms['modules'][$crow["acontent_module"]]['path'] . 'inc/cnt.article.php'; } // check if top link should be shown $CNT_TMP .= getContentPartTopLink($crow["acontent_top"]); // Space after if ($crow["acontent_after"]) { if (!empty($template_default["article"]["div_spacer"])) { $CNT_TMP .= '<div style="margin-bottom:' . $crow["acontent_after"] . 'px;" class="' . $template_default['classes']['spaceholder-cp-after'] . '"></div>'; } else { $CNT_TMP .= '<br class="' . $template_default['classes']['spaceholder-cp-after'] . '" />' . spacer(1, $crow["acontent_after"]); } } // Maybe content part ID should b used inside templates or for something different $CNT_TMP = str_replace(array('[%CPID%]', '{CPID}'), $crow["acontent_id"], $CNT_TMP); // trigger content part functions $CNT_TMP = trigger_cp($CNT_TMP, $crow); //check if PHP replacent tags are allowed for content if (empty($phpwcms["allow_cntPHP_rt"])) { $CNT_TMP = remove_unsecure_rptags($CNT_TMP); } // wrap tab if (!empty($crow['acontent_tab'])) { $crow['acontent_tab'] = explode('_', $crow['acontent_tab'], 2); $crow['acontent_tab']['num'] = explode('|', $crow['acontent_tab'][0]); $crow['acontent_tab']['type'] = empty($crow['acontent_tab']['num'][1]) ? 1 : $crow['acontent_tab']['num'][1];
function build_levels($struct, $level, $temp_tree, $act_cat_id, $nav_table_struct, $count, $div, $link_to) { // this returns the level structure based on given arrays // it is special for browsing from root levels $nav_table_struct["linkimage_over_js"] = $nav_table_struct['array_struct'][$count]["linkimage_over_js"]; $nav_table_struct["linkimage_norm"] = $nav_table_struct['array_struct'][$count]["linkimage_norm"]; $nav_table_struct["linkimage_over"] = $nav_table_struct['array_struct'][$count]["linkimage_over"]; $nav_table_struct["linkimage_active"] = $nav_table_struct['array_struct'][$count]["linkimage_active"]; $nav_table_struct["row_norm_bgcolor"] = $nav_table_struct['array_struct'][$count]["row_norm_bgcolor"]; $nav_table_struct["row_norm_class"] = $nav_table_struct['array_struct'][$count]["row_norm_class"]; $nav_table_struct["row_over_bgcolor"] = $nav_table_struct['array_struct'][$count]["row_over_bgcolor"]; $nav_table_struct["row_active_bgcolor"] = $nav_table_struct['array_struct'][$count]["row_active_bgcolor"]; $nav_table_struct["row_active_class"] = $nav_table_struct['array_struct'][$count]["row_active_class"]; $nav_table_struct["space_celltop"] = $nav_table_struct['array_struct'][$count]["space_celltop"]; $nav_table_struct["space_cellbottom"] = $nav_table_struct['array_struct'][$count]["space_cellbottom"]; $nav_table_struct["cell_height"] = $nav_table_struct['array_struct'][$count]["cell_height"]; $nav_table_struct["cell_class"] = $nav_table_struct['array_struct'][$count]["cell_class"]; $nav_table_struct["cell_active_height"] = $nav_table_struct['array_struct'][$count]["cell_active_height"]; $nav_table_struct["cell_active_class"] = $nav_table_struct['array_struct'][$count]["cell_active_class"]; $nav_table_struct["link_before"] = $nav_table_struct['array_struct'][$count]["link_before"]; $nav_table_struct["link_after"] = $nav_table_struct['array_struct'][$count]["link_after"]; $nav_table_struct["link_active_before"] = $nav_table_struct['array_struct'][$count]["link_active_before"]; $nav_table_struct["link_active_after"] = $nav_table_struct['array_struct'][$count]["link_active_after"]; $temp_menu = ''; $js = ''; $depth = count($temp_tree) - $div; $current_level = $count; $count++; $depth2 = $depth - $count + 2; $right_cell = ''; $left_cell = ''; $cell_top = ''; $cell_bottom = ''; $space_right = ''; $space_cell = ''; $space_row = ''; $cell_height = $nav_table_struct["cell_height"] ? $nav_table_struct["cell_height"] : 1; if ($nav_table_struct["space_right"]) { $right_cell = "<td width=\"" . $nav_table_struct["space_left"] . "\">"; $right_cell .= spacer($nav_table_struct["space_right"], $cell_height) . "</td>\n"; $space_right = "<td>" . spacer(1, 1) . "</td>"; } if ($nav_table_struct["space_left"]) { $colspan = $count > 1 ? " colspan=\"" . $count . "\"" : ""; $left_cell = "<td width=\"" . $nav_table_struct["space_left"] . "\"" . $colspan . ">"; $left_cell .= spacer($nav_table_struct["space_left"], $cell_height) . "</td>\n"; $space_cell = "<td" . $colspan . ">" . spacer(1, 1) . "</td><td>" . spacer(1, 1) . "</td>"; } else { if ($count > 1) { $colspan = $count > 2 ? " colspan=\"" . ($count - 1) . "\"" : ""; $left_cell = "<td " . $colspan . ">" . spacer(1, 1) . "</td>\n"; $space_cell = "<td" . $colspan . ">" . spacer(1, 1) . "</td><td>" . spacer(1, 1) . "</td>"; } } if ($nav_table_struct["space_celltop"]) { $cell_top = spacer(1, $nav_table_struct["space_celltop"]) . "<br />"; } if ($nav_table_struct["space_cellbottom"]) { $cell_bottom = "<br />" . spacer(1, $nav_table_struct["space_cellbottom"]); } $colspan = $depth2 > 1 ? ' colspan="' . $depth2 . '"' : ''; foreach ($struct as $key => $value) { if (_getStructureLevelDisplayStatus($key, $level)) { $link_image_id = "linkid" . generic_string(6); $link_name_id = ' name="' . $link_image_id . '" id="' . $link_image_id . '"'; if (!$struct[$key]["acat_redirect"]) { $link = 'index.php?'; if ($struct[$key]["acat_alias"]) { $link .= html_specialchars($struct[$key]["acat_alias"]); } else { $link .= 'id=' . $key; //',0,0,1,0,0'; } $redirect['target'] = ''; } else { $redirect = get_redirect_link($struct[$key]["acat_redirect"], ' ', ''); $link = $redirect['link']; } $js = ' style="cursor:pointer;cursor:hand;"'; //display:block; $js_act = $js; if ($nav_table_struct["js_over_effects"]) { if ($redirect['target'] != ' target="_blank"') { $js .= " onclick=\"location.href='" . js_singlequote($link) . "';return false;\""; } else { $js .= " onclick=\"window.open('" . js_singlequote($link) . "', 'phpwcmnewwin');return false;\""; } $js_act = $js; $js .= ' onmouseover="'; if ($nav_table_struct["linkimage_over_js"]) { $js .= "MM_swapImage('" . $link_image_id . "','','" . $nav_table_struct["linkimage_over_js"] . "',1);"; } if ($nav_table_struct["row_over_bgcolor"]) { $js .= "this.bgColor='" . $nav_table_struct["row_over_bgcolor"] . "';"; } $js .= '" onmouseout="'; if ($nav_table_struct["linkimage_over_js"]) { $js .= "MM_swapImgRestore();"; } if ($nav_table_struct["row_norm_bgcolor"]) { $js .= "this.bgColor='" . $nav_table_struct["row_norm_bgcolor"] . "';"; } $js .= '"'; } else { $js = ''; } // add structure level based classes if (!empty($struct[$key]["acat_class"])) { $nav_table_struct_temp = $nav_table_struct; $nav_table_struct["row_norm_class"] = trim($nav_table_struct["row_norm_class"] . ' ' . $struct[$key]["acat_class"]); $nav_table_struct["row_active_class"] = trim($nav_table_struct["row_active_class"] . ' ' . $struct[$key]["acat_class"]); $nav_table_struct["row_space_class"] = 'row_space ' . $struct[$key]["acat_class"]; } else { $nav_table_struct_temp = NULL; } //spacer row if ($nav_table_struct["row_space"]) { $space_row = "<tr" . table_attributes($nav_table_struct, "row_space", 0, true) . ">\n" . $space_cell; $space_row .= "<td" . $colspan . ">" . spacer(1, $nav_table_struct["row_space"]) . "</td>"; $space_row .= $space_right . "\n</tr>\n"; $temp_menu .= $space_row; } if (!empty($temp_tree[$key])) { //if($act_cat_id == $key) { //check if inside active tree structure if ($act_cat_id == $key || !empty($nav_table_struct["all_nodes_active"]) && isset($GLOBALS['LEVEL_KEY'][$key])) { $temp_menu .= "<tr" . table_attributes($nav_table_struct, "row_active", 0, true) . $js_act . ">\n" . $left_cell; $temp_menu .= "<td valign=\"top\">" . str_replace('#', $link_name_id, $nav_table_struct["linkimage_active"]) . "</td>\n"; $temp_menu .= "<td" . table_attributes($nav_table_struct, "cell_active", 1, true) . $colspan . ">" . $cell_top; $temp_menu .= '<a href="' . $link . '"' . $redirect['target'] . '>'; $temp_menu .= $nav_table_struct["link_active_before"]; $temp_menu .= html_specialchars($struct[$key]["acat_name"]); $temp_menu .= $nav_table_struct["link_active_after"] . '</a>'; } else { $temp_menu .= "<tr" . table_attributes($nav_table_struct, "row_norm", 0, true) . $js . ">\n" . $left_cell; $temp_menu .= "<td valign=\"top\">" . str_replace('#', $link_name_id, $nav_table_struct["linkimage_norm"]) . "</td>\n"; $temp_menu .= "<td" . table_attributes($nav_table_struct, "cell", 1, true) . $colspan . ">" . $cell_top; $temp_menu .= '<a href="' . $link . '"' . $redirect['target'] . '>'; $temp_menu .= $nav_table_struct["link_before"]; $temp_menu .= html_specialchars($struct[$key]["acat_name"]); $temp_menu .= $nav_table_struct["link_after"] . '</a>'; } $temp_menu .= $cell_bottom . "</td>\n" . $right_cell . "</tr>\n"; $temp_menu .= build_levels($struct, $key, $temp_tree, $act_cat_id, $nav_table_struct, $count, $div, $link_to); } else { $temp_menu .= "<tr" . table_attributes($nav_table_struct, "row_norm", 0, true) . $js . ">\n" . $left_cell; $temp_menu .= "<td valign=\"top\">" . str_replace('#', $link_name_id, $nav_table_struct["linkimage_norm"]) . "</td>\n"; $temp_menu .= "<td" . table_attributes($nav_table_struct, "cell", 1, true) . $colspan . ">" . $cell_top; $temp_menu .= '<a href="' . $link . '"' . $redirect['target'] . '>'; $temp_menu .= $nav_table_struct["link_before"]; $temp_menu .= html_specialchars($struct[$key]["acat_name"]); $temp_menu .= $nav_table_struct["link_after"] . '</a>'; $temp_menu .= $cell_bottom . "</td>\n" . $right_cell . "</tr>\n"; } // reset table structure attributes if ($nav_table_struct_temp !== NULL) { $nav_table_struct = $nav_table_struct_temp; } } } if ($nav_table_struct["row_space"] && $count == 1) { $temp_menu .= $space_row; } return $temp_menu; }
function listing_page ($message = null) { global $self, $directory, $sort, $reverse; html_header(); $list = getlist($directory); if (array_key_exists('sort', $_GET)) $sort = $_GET['sort']; else $sort = 'filename'; if (array_key_exists('reverse', $_GET) && $_GET['reverse'] == 'true') $reverse = true; else $reverse = false; sortlist($list, $sort, $reverse); echo ' <form enctype="multipart/form-data" action="' . $self . '?tool=Files" method="post"> <table id="main"> '; directory_choice(); if (!empty($message)) { spacer(); echo $message; } if (@is_writable($directory)) { upload_box(); create_box(); } else { spacer(); } if ($list) { listing($list); } else { echo error('not_readable', $directory); } echo '</table> </form> '; html_footer(); }
function system_packages() { $sock = new sockets(); $users = new usersMenus(); $KASPERSKY_APPLIANCE = FALSE; if ($users->KASPERSKY_SMTP_APPLIANCE) { $KASPERSKY_APPLIANCE = TRUE; } if ($users->KASPERSKY_WEB_APPLIANCE) { $KASPERSKY_APPLIANCE = TRUE; } $GlobalApplicationsStatus = $sock->APC_GET("GlobalApplicationsStatus", 2); if ($GlobalApplicationsStatus == null) { $GlobalApplicationsStatus = base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes')); $sock->APC_SAVE("GlobalApplicationsStatus", $GlobalApplicationsStatus); } $html = "\n\n<br>\n<table style='width:100%;padding:2px:margin:3px;border:1px solid #CCCCCC'>\n<tr style='background-color:#CCCCCC'>\n<td> </td>\n<td style='font-size:13px'><strong>{software}</strong></td>\n<td style='font-size:13px'><strong>{current_version}</strong></td>\n<td style='font-size:13px'><strong>{available_version}</strong></td>\n<td style='font-size:13px'> </td>\n<td style='font-size:13px'><strong>{status}</strong></td>\n</tr>"; if ($users->VMWARE_HOST) { $html = $html . BuildRows("APP_VMTOOLS", $GlobalApplicationsStatus, "VMwareTools"); } $html = $html . BuildRows("APP_MYSQL", $GlobalApplicationsStatus, "mysql-cluster-gpl"); $html = $html . BuildRows("APP_PDNS", $GlobalApplicationsStatus, "pdns"); //$html=$html.BuildRows("APP_EACCELERATOR",$GlobalApplicationsStatus,"eaccelerator"); if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_DAR", $GlobalApplicationsStatus, "dar"); } $html = $html . BuildRows("APP_MSMTP", $GlobalApplicationsStatus, "msmtp"); $html = $html . BuildRows("APP_EMAILRELAY", $GlobalApplicationsStatus, "emailrelay"); $html = $html . BuildRows("APP_OCSI_LINUX_CLIENT", $GlobalApplicationsStatus, "OCSNG_LINUX_AGENT"); if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_PUREFTPD", $GlobalApplicationsStatus, "pure-ftpd"); } $html = $html . BuildRows("APP_SMARTMONTOOLS", $GlobalApplicationsStatus, "smartmontools"); $html = $html . BuildRows("APP_PHPLDAPADMIN", $GlobalApplicationsStatus, "phpldapadmin"); $html = $html . BuildRows("APP_PHPMYADMIN", $GlobalApplicationsStatus, "phpMyAdmin"); if (!$KASPERSKY_APPLIANCE) { $html = $html . BuildRows("APP_CLAMAV", $GlobalApplicationsStatus, "clamav"); $html = $html . BuildRows("APP_AMACHI", $GlobalApplicationsStatus, "hamachi"); $html = $html . BuildRows("APP_MLDONKEY", $GlobalApplicationsStatus, "mldonkey"); $html = $html . spacer('{computers_management}'); $html = $html . BuildRows("APP_NMAP", $GlobalApplicationsStatus, "nmap"); $html = $html . BuildRows("APP_WINEXE", $GlobalApplicationsStatus, "winexe-static"); $html = $html . BuildRows("APP_OCSI", $GlobalApplicationsStatus, "OCSNG_UNIX_SERVER"); } if (!$KASPERSKY_APPLIANCE) { $html = $html . spacer('{xapian_packages}'); $html = $html . BuildRows("APP_XAPIAN", $GlobalApplicationsStatus, "xapian-core"); $html = $html . BuildRows("APP_XAPIAN_OMEGA", $GlobalApplicationsStatus, "xapian-omega"); $html = $html . BuildRows("APP_XAPIAN_PHP", $GlobalApplicationsStatus, "xapian-bindings"); $html = $html . BuildRows("APP_XPDF", $GlobalApplicationsStatus, "xpdf"); //$html=$html.BuildRows("APP_UNZIP",$GlobalApplicationsStatus,"unzip"); $html = $html . BuildRows("APP_UNRTF", $GlobalApplicationsStatus, "unrtf"); $html = $html . BuildRows("APP_CATDOC", $GlobalApplicationsStatus, "catdoc"); $html = $html . BuildRows("APP_ANTIWORD", $GlobalApplicationsStatus, "antiword"); } $html = $html . "</table>"; if (posix_getuid() == 0) { file_put_contents(dirname(__FILE__) . "/ressources/logs/setup.index." . __FUNCTION__ . ".html", $html); return null; } $tpl = new templates(); return $tpl->_ENGINE_parse_body($html); }