function paocols($msg, $n, $s = 0) { $n = $n ? $n : 2; if (strpos($msg, "</p>")) { $sep = "</p>"; } elseif (strpos($msg, "\n")) { $sep = "\n"; } else { $sep = " "; } $r = explode($sep, $msg); if ($s) { for ($i = 0; $i < $s; $i++) { $ret .= $r[$i] . $sep; unset($r[$i]); } } $nb = count($r); $nbc = strlen(implode('', $r)); for ($i = 0; $i <= $nb; $i++) { $c = strlen($r[$i]); $cc += $c; $ccb += $c; if ($cc > $nbc / $n) { $cc = 0; $o++; } if (trim($r[$i])) { $rb[$o] .= trim($r[$i]) . $sep; } } $ret .= colonize($rb, $n, '', '', 0, 1); $w = prma('content') + 1; return divs('width:' . $w . 'px;', $ret); }
function home_plan($load, $n) { if ($load) { ksort($load); foreach ($load as $mrf => $ids) { $i++; $line = $_SESSION['line'][$mrf]; $mn = $_SESSION['mn'][$mrf]; if ($n == 2) { $re = outputimg($ids); } else { $re = m_pubart($ids, "scroll", "10000"); } if ($mrf != "user" && $mrf != "_system" && $re && ($line or $mn)) { if ($n == 2) { $nib = 25; } else { $nib = 7; } if ($line) { $got = htac('section') . $mrf; } else { $got = subdom($mrf); } $nbrt = btn("txtsmall2", nbof(count($ids), 1)); $ret[$i] = lkc('txtcadr', $got, $mrf) . ' ' . $nbrt . br(); $ret[$i] .= divc("tab", scroll($ids, $re, $nib)) . br(); } } if ($ret) { if (count($ret) < 2 or $n == 2) { $prm = 1; } else { $prm = 2; } return colonize($ret, $prm, 'board', 'pubart'); } } }
function show_params_cat($r, $h) { $ron = 1; $fon = 0; $j = 'lang_admin*restrictions_'; foreach ($r as $k => $v) { $hlp = bubble('txtsmall2', 'popmsqt', $j . $k . '_description', $k); $t = $h[$k][0] ? $h[$k][0] : $v; if (rstr($k)) { $n = 1; $c = ''; } else { $n = 0; $c = 'active'; } $ret[] = offon($n) . ' ' . btn($cx, lj('', 'rstr_params___' . $k . '_' . $n, $t)) . $hlp . br(); } return divc('nbp', colonize($ret, 3, '', '', 550)); }
} else { $new_mod = 1; } $sth = mysql_query("update fleet_info set milminister=" . $new_mod . " where fid='" . $fid . "'"); if (!$sth) { show_svg_message("ERR:: SETTING NEW MINISTER OF DEFENCE"); } else { echo "<SR_REQUEST type=\"MOD\" mod=\"" . $new_mod . "\"/>"; } } switch ($_GET["act"]) { case "move": move_fleet(0); break; case "colonize": colonize(); break; case "jumpgate": jump($target1, $target2); break; case "attack": attack(); break; case "bomb": bomb(); break; case "trade": trade(); break; case "invade": invade();