# Far Development by Development Team - webspell.org # # # # visit webspell.org # # # ########################################################################## */ $_language->read_module('login'); if ($loggedin) { $username = '******' . $userID . '">' . strip_tags(getnickname($userID)) . '</a>'; $myprofile = '<a href="user/' . $userID . '">My profile</a>'; if (isanyadmin($userID)) { $admin = '<a href="admin/admincenter.php" target="_blank">Admin</a>'; } else { $admin = ''; } if (isclanmember($userID) or iscashadmin($userID)) { $cashbox = '• <a href="index.php?site=cash_box">' . $_language->module['cash-box'] . '</a>'; } else { $cashbox = ''; } $anz = getnewmessages($userID); if ($anz) { $newmessages = ' (<b>' . $anz . '</b>)'; } else { $newmessages = '0'; } if ($getavatar = getavatar($userID)) { $l_avatar = '<img src="images/avatars/' . $getavatar . '" alt="Avatar" />'; } else { $l_avatar = $_language->module['n_a']; }
if (isanymoderator($id)) { $mod = '<input type="checkbox" name="moderator" value="1" onmouseover="showWMTT(\'id8\')" onmouseout="hideWMTT()" checked="checked" />'; } else { $mod = '<input type="checkbox" name="moderator" value="1" onmouseover="showWMTT(\'id8\')" onmouseout="hideWMTT()" />'; } if (ispageadmin($id)) { $page = '<input type="checkbox" name="pageadmin" value="1" onmouseover="showWMTT(\'id9\')" onmouseout="hideWMTT()" checked="checked" />'; } else { $page = '<input type="checkbox" name="pageadmin" value="1" onmouseover="showWMTT(\'id9\')" onmouseout="hideWMTT()" />'; } if (isfileadmin($id)) { $file = '<input type="checkbox" name="fileadmin" value="1" onmouseover="showWMTT(\'id10\')" onmouseout="hideWMTT()" checked="checked" />'; } else { $file = '<input type="checkbox" name="fileadmin" value="1" onmouseover="showWMTT(\'id10\')" onmouseout="hideWMTT()" />'; } if (iscashadmin($id)) { $cash = '<input type="checkbox" name="cashadmin" value="1" onmouseover="showWMTT(\'id11\')" onmouseout="hideWMTT()" checked="checked" />'; } else { $cash = '<input type="checkbox" name="cashadmin" value="1" onmouseover="showWMTT(\'id11\')" onmouseout="hideWMTT()" />'; } if (isgalleryadmin($id)) { $gallery = '<input type="checkbox" name="galleryadmin" value="1" onmouseover="showWMTT(\'id12\')" onmouseout="hideWMTT()" checked="checked" />'; } else { $gallery = '<input type="checkbox" name="galleryadmin" value="1" onmouseover="showWMTT(\'id12\')" onmouseout="hideWMTT()" />'; } if (issuperadmin($id)) { $super = '<input type="checkbox" name="superadmin" value="1" onmouseover="showWMTT(\'id13\')" onmouseout="hideWMTT()" checked="checked" />'; } else { $super = '<input type="checkbox" name="superadmin" value="1" onmouseover="showWMTT(\'id13\')" onmouseout="hideWMTT()" />'; } $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_groups");
function print_cashbox($squadID, $id) { global $_language; $_language->read_module('cash_box'); $bg1 = BG_1; $bg2 = BG_2; $pagebg = PAGEBG; $border = BORDER; $bghead = BGHEAD; $bgcat = BGCAT; global $wincolor; global $loosecolor; global $drawcolor; global $userID; if ($id) { $squadergebnis = safe_query("SELECT squad FROM " . PREFIX . "cash_box WHERE cashID='" . $id . "'"); $dv = mysql_fetch_array($squadergebnis); $squadID = $dv['squad']; } $costs_squad = ''; if ($squadID == 0) { $usersquad = $_language->module['clan']; } else { $ergebnis_squad = safe_query("SELECT * FROM " . PREFIX . "cash_box_payed, " . PREFIX . "cash_box WHERE " . PREFIX . "cash_box_payed.payed='1' AND " . PREFIX . "cash_box_payed.cashID=" . PREFIX . "cash_box.cashID AND " . PREFIX . "cash_box.squad = '" . $squadID . "'"); $anz_squad = mysql_num_rows($ergebnis_squad); $costs_squad = 0.0; if ($anz_squad) { while ($dss = mysql_fetch_array($ergebnis_squad)) { $costs_squad += $dss['costs']; } } $ergebnis_squad = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE squad='{$squadID}'"); $anz_squad = mysql_num_rows($ergebnis_squad); if ($anz_squad) { while ($dss = mysql_fetch_array($ergebnis_squad)) { $costs_squad -= $dss['totalcosts']; } } $costs_squad = ' (' . $costs_squad . ' euro)'; $usersquad = $_language->module['squad'] . ": " . getsquadname($squadID); } $ergebnis = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE squad='" . $squadID . "' ORDER BY paydate DESC LIMIT 0,1"); echo '<br /><br /><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" width="180"><b>' . $usersquad . $costs_squad . '</b></td> </tr> <tr> <td height="1" bgcolor="' . BG_1 . '" width="100%" colspan="4"></td> </tr> <tr><td height="15"></td></tr>'; echo '<tr> <td valign="top" width="180">'; if (mysql_num_rows($ergebnis)) { $ds = mysql_fetch_array($ergebnis); if (!$id) { $id = $ds['cashID']; } $ergebnis = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE cashID='{$id}'"); $ds = mysql_fetch_array($ergebnis); $date = date("d.m.Y", $ds['date']); $paydate = date("d.m.Y", $ds['paydate']); $bezahlen = safe_query("SELECT * FROM " . PREFIX . "cash_box_payed WHERE cashID='{$id}' AND payed='1' "); $payed = mysql_num_rows($bezahlen); $konto = cleartext($ds['konto']); $usage = $ds['usedfor']; if (iscashadmin($userID)) { $adminaction = '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=cash_box&action=edit&id=' . $id . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" /> <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'cash_box.php?delete=true&id=' . $id . '\')" value="' . $_language->module['delete'] . '" />'; } eval("\$cash_box_usage = \"" . gettemplate("cash_box_usage") . "\";"); echo $cash_box_usage; $all = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE squad='" . $squadID . "' ORDER BY paydate DESC"); echo '<br /><br />'; while ($ds = mysql_fetch_array($all)) { echo '• <a href="index.php?site=cash_box&id=' . $ds['cashID'] . '&squad=' . $squadID . '"><b>' . $ds['usedfor'] . '</b></a><br />'; } echo '</td><td width="10"> </td> <td valign="top">'; $members = array(); $ergebnis = safe_query("SELECT * FROM " . PREFIX . "user ORDER BY nickname"); while ($du = mysql_fetch_array($ergebnis)) { if ($squadID == 0) { if (isclanmember($du['userID'], $squadID)) { $members[] = $du['userID']; } } else { if (issquadmember($du['userID'], $squadID)) { $members[] = $du['userID']; } } } eval("\$cash_box_head = \"" . gettemplate("cash_box_head") . "\";"); echo $cash_box_head; if (count($members)) { foreach ($members as $usID) { $ergebnis = safe_query("SELECT * FROM " . PREFIX . "cash_box_payed WHERE userID='{$usID}' AND cashID='{$id}'"); $du = mysql_fetch_array($ergebnis); $user = '******' . $usID . '"><b>' . getnickname($usID) . '</b></a>'; if ($du['payed']) { $paydate = date("d.m.Y", $du['date']); $payed = '<font color="' . $wincolor . '">' . $_language->module['paid'] . ': ' . $paydate . '</font>'; } else { $payed = '<font color="' . $loosecolor . '">' . $_language->module['not_paid'] . '</font>'; } if (iscashadmin($userID)) { if ($du['costs']) { $bg = BG_1; $costs = $du['costs']; } else { $costs = ""; $bg = BG_2; } $payment = '<input type="text" size="7" name="payid[' . $usID . ']" value="' . $costs . '" dir="rtl" /> €'; } else { if ($du['costs']) { $costs = '<font color="' . $wincolor . '"><b>' . $du['costs'] . ' €</b></font>'; $bg = BG_1; } else { $costs = '<font color="' . $loosecolor . '">0.00 €</font>'; $bg = BG_2; } $payment = $costs; } eval("\$cash_box_content = \"" . gettemplate("cash_box_content") . "\";"); echo $cash_box_content; } } if (iscashadmin($userID)) { $admin = '<input type="hidden" name="id" value="' . $id . '" /><input type="submit" name="pay" value="' . $_language->module['update'] . '" />'; } eval("\$cash_box_foot = \"" . gettemplate("cash_box_foot") . "\";"); echo $cash_box_foot; } else { echo $_language->module['no_entries']; } echo '</td></tr></table>'; }