if (!$menu) { $menu = "adm"; } //selecting of location menu include "./r_pr_post.php"; // page header head($sess, $x, $auth, $design, $menu); $sql = mysql_query("SELECT * FROM uniletim_sections WHERE sec_id = '{$rub}' AND ul_group = '{$sess['4']}'"); $row = mysql_fetch_row($sql); $rn = $row[1]; @($sql = mysql_query("SELECT S.*,count(D.ann_id) FROM uniletim_subsections S \r\n\t\t\t\t\tLEFT JOIN uniletim_announces D ON S.sub_id=D.ann_sub \r\n\t\t\t\t\tWHERE S.sub_section='{$rub}' AND S.ul_group = '{$sess['4']}' GROUP BY S.sub_id ORDER BY S.sub_name")); if (mysql_num_rows($sql) == 0) { $error = _NO_SUBSECTION; } $loc_page = "{$rn}: " . _SUBSECTION; page_location_announces($sess, $menu, $rub, $pri, $uoz, $eid, $loc_page); page_result_error($result, $error); ?> <div class="content-border"> <table cellspacing="0" class="content"> <thead> <tr class="th_main"> <th align=left colspan="5" class="td_tmave"> <?php echo _NEW_SUNSECTION; ?> </th> </tr> <thead> <TR>
function member_add_existing($sess, $menu) { @($sql = mysql_query("SELECT DISTINCT M.* FROM uniletim_members M\r\n\t\t\t\t\t\t\t\tLEFT JOIN uniletim_perms P ON M.mbr_id = P.perm_member\r\n\t\t\t\t\t\t\t\tWHERE P.perm_group != '{$sess['4']}' AND M.mbr_state != 'd' ORDER BY M.mbr_login")); if (mysql_num_rows($sql) == 0) { $error = _NO_USER; } $loc_page = _EXISTING_USER; page_location_announces($sess, $menu, $rub, $pri, $id, $eid, $loc_page); page_result_error($result, $error); ?> <div class="content-border"> <table class="content-form"> <form name="add_ex" method="post" action="u_info.php"> <tr> <td class="form-i-name"><?php echo _USER; ?> </td> <td> <select name="exid"> <OPTION value="0"><?php echo _SELECT; ?> </OPTION> <?php while ($row = mysql_fetch_row($sql)) { ?> <OPTION value="<?php echo $row[0]; ?> "><?php echo "{$row['4']} {$row['5']} - {$row['1']}"; ?> </OPTION> <?php } ?> </SELECT> </td> </tr> <tr> <td class="form-i-name"><?php echo _PERMS; ?> :</td> <td> <?php member_perms_select($perms, $sess); ?> </td> </tr> <tr> <td class="form-i-name"></td> <td> <INPUT TYPE="hidden" NAME="perm_group" VALUE="<?php echo $sess[4]; ?> "> <INPUT TYPE="submit" NAME="uloz" VALUE="<?php echo _CREATE; ?> "></td> </tr> </form> </table></div> <?php }
function announces_user($sess, $uoz, $anned, $page) { // procesing data from forms if ($edid != "" || $did != "") { include "./o_post.php"; } // user if (!isset($uoz)) { $uoz = $sess[2]; } // number of table columns if ($sess[3] != "timebank") { $cs = "6"; $cs1 = "5"; } else { $cs = "6"; $cs1 = "5"; } // secect user name @($uss = mysql_query("SELECT * FROM uniletim_members WHERE mbr_id = '{$uoz}'")); $usv = mysql_fetch_row($uss); $select = "ann_member = '{$uoz}'"; // number of listed items $view_number = 15; $menu = "ann"; page_location_announces($sess, $menu, $rub, $pri, $uoz, $eid, $loc_page); page_result_error($result, $error); if ($sess[3] == "lets" & $uoz == $sess[2]) { ?> <div class="content-border"> <table cellspacing="0" class="content"><?php // list of news $lres = _NEWS; $dopon = "news"; announces_listing($sess, $dopon, $select, $lres, $view_number, $page, $cs, $cs1, $uoz, $rub, $pri, $keyword, $age); ?> </table> </div><?php } ?> <div class="content-border"> <table cellspacing="0" class="content"><?php // list of offers $lres = _OFFER; $dopon = "ponuka"; announces_listing($sess, $dopon, $select, $lres, $view_number, $page, $cs, $cs1, $uoz, $rub, $pri, $keyword, $age); ?> </table> </div> <div class="content-border"> <table cellspacing="0" class="content"><?php // list of query $lres = _QUERY; $dopon = "dopyt"; announces_listing($sess, $dopon, $select, $lres, $view_number, $page, $cs, $cs1, $uoz, $rub, $pri, $keyword, $age); ?> </table> </div> <div class="content-border"> <table cellspacing="0" class="content"> <thead> <tr class="th_main"> <th><b><a target="_blank" href="index.php?action=print&uoz=<?php echo "{$uoz}"; ?> "><?php echo _PRINT; ?> </a></b></th> <th colspan="<?php echo $cs1; ?> "> </th> </tr> </thead> </table> </div> <?php }
function group_list($sess, $group, $result, $result1, $result2, $error, $error1, $error2) { $cs1 = " colspan=2"; $cs2 = " colspan=6"; $loc_page = _GROUPS; page_location_announces($sess, $menu, $rub, $pri, $uoz, $eid, $loc_page); page_result_error($result, $error); ?> <?php $sql = mysql_query("SELECT * FROM uniletim_groups ORDER BY 'grp_name'"); ?> <div class="content-border"> <table class="content"> <tr class="td_tmave"> <td colspan="5"><?php echo _GROUPS; ?> : </td></tr> <?php $i = 0; while ($row = mysql_fetch_row($sql)) { if ($i % 2 == 0) { $bgcolor = ''; } else { $bgcolor = " class=td_rd"; } ?> <TR <?php echo $bgcolor; ?> > <TD><A HREF="group.php?action=info&group=<?php echo $row[0]; ?> "><?php echo $row[1]; ?> </A></TD> <TD><?php group_type($row); ?> </TD> <TD align="right"><?php $message = MySQL_Query("SELECT M.mbr_id FROM uniletim_members M LEFT JOIN uniletim_perms P ON M.mbr_id = P.perm_member WHERE P.perm_group = '{$row['0']}'") or die($query_error); $i = 0; while ($entry = MySQL_Fetch_Row($message)) { $i++; } echo "{$i} l "; $message = MySQL_Query("SELECT count(ann_id) FROM uniletim_announces WHERE ul_group = '{$row['0']}'") or die($query_error); $entry = MySQL_Fetch_Row($message); echo "{$entry['0']} l "; $message = MySQL_Query("SELECT count(ser_id) FROM uniletim_services WHERE ul_group = '{$row['0']}'") or die($query_error); $entry = MySQL_Fetch_Row($message); echo "{$entry['0']}"; ?> </TD> <TD align="right"> <A HREF="index.php?group_ch=<?php echo $row[0]; ?> &grp_name=<?php echo $row[1]; ?> "><?php echo _LOGIN; ?> </A></TD> <TD align="right"> <A HREF="group.php?action=list&group_del=<?php echo "{$row['0']}"; ?> " onclick="return confirm('<?php echo _RLY_DLT_GRP; ?> ')"><?php echo _DELETE; ?> </A> </td> <?php $i++; } ?> <tr class="td_tmave"> <td colspan="5"><a class="tm" href="group.php?action=new"><?php echo _NEW_GROUP; ?> </a> </td></tr> </TR> </TABLE> </div> <?php }