$result = createAttribute($newCode, $newName, $newDescription); $attributeID = intval($result[0]); $error = $result[1]; } else { $attributeID = intval($_POST["id"]); if ($newCode != $_POST["oldAttributeCode"] || $newName != $_POST["oldAttributeName"] || $newDescription != $_POST["oldAttributeDescription"]) { $error = updateAttribute($attributeID, $newCode, $newName, $newDescription); } } $labelChanges = array(); for ($i = 0; $i < $maxLabels; $i++) { //If nothing changed, skip this label $code = emptyAsNull(stripString1($_POST["labelCode"][$i])); $nameChange = $code != null && $_POST["oldLabelName"][$i] == '' || $_POST["labelName"][$i] != $_POST["oldLabelName"][$i]; $descChange = $_POST["labelDescription"][$i] != $_POST["oldLabelDescription"][$i]; $delete = checkDelete($code); if ($code == null || !($nameChange || $descChange || $delete)) { continue; } $labelID = intval($_POST["labelID"][$i]); $change = new LabelUpdate(); $change->id = $labelID; $change->attributeID = $attributeID; $change->code = $code; $change->newName = stripString2($_POST["labelName"][$i]); if ($change->newName == '') { $change->newName = $change->code; } $change->newDescription = stripString2($_POST["labelDescription"][$i]); $change->delete = $delete; $labelChanges[] = $change;
//$tuser = dbcount("(guser_id)",DB_GS_GROUP_USERS, "guser_group='".$_GET['view']."'"); while ($new_new = dbarray($new_news)) { echo ($new_new['vnews_type'] == "1" ? $locale['gs47'] : $locale['gs78']) . "<a href='" . BASEDIR . "group_news.php?view=" . $new_new['vnews_news'] . "'>" . $new_new['news_title'] . "</a>" . ($new_new['news_author'] == $userdata['user_id'] ? " <a href='" . BASEDIR . "news_admin.php?action=edit&id=" . $new_new['news_id'] . "'><img src='" . IMAGES . "edit.png' width='10' /></a> <a href='" . BASEDIR . "news_admin.php?action=delete&id=" . $new_new['news_id'] . "'><img src='" . IMAGES . "no.png' width='10' /></a>" : "") . " <strong style='color:green;'>" . $new_new['vnews_have'] . " (" . round($new_new['vnews_have'] / $new_new['vnews_need'] * 100) . "%)</strong> / <strong style='color:red;'>" . $new_new['vnews_unhave'] . " (" . round($new_new['vnews_unhave'] / $new_new['vnews_need'] * 100) . "%)</strong> "; if (inLine($userdata['user_id'], $new_new['vnews_canvote']) && !inLine($userdata['user_id'], $new_new['vnews_voted'])) { echo "<form name='request" . $new_new['vnews_id'] . "yes' method='post'><input type='hidden' name='vid' value='" . $new_new['vnews_id'] . "' /><input type='hidden' name='vote' value='yes' /><input type='submit' name='vote_news' class='button' value='" . $locale['gs39'] . "' /></form> <form name='request" . $new_new['vnews_id'] . "no' method='post'><input type='hidden' name='vid' value='" . $new_new['vnews_id'] . "' /><input type='hidden' name='vote' value='no' /><input type='submit' name='vote_news' class='button' value='" . $locale['gs40'] . "' /></form>"; } echo "<br />"; } } } if (dbrows($news)) { $i = 1; echo "<table width='95%'>"; while ($new = dbarray($news)) { echo "<tr><td width='1%'>" . $i . "</td><td><a href='" . BASEDIR . "group_news.php?view=" . $new['news_id'] . "'>" . $new['news_title'] . "</a>"; /* ".(iMEMBER && $userdata['user_id'] == $group['group_creator'] ? "<a href='".BASEDIR."group.php?action=del&id=".$new['news_id']."'><img src='".IMAGES."no.png' width='10' alt='delete' /></a>" : "")."*/ echo " " . (iMEMBER && inGroup($_GET['view']) && !checkDelete("n", $new['news_id']) ? "<a href='" . BASEDIR . "group.php?votedelete=" . $new['news_id'] . "'><img src='" . IMAGES . "no.png' width='10' alt='votedelete' /></a>" : "") . "</td></tr>"; } echo "</table>"; } else { echo $locale['gs36']; } echo "</td></tr></table>"; closeside(); openside($locale['gs64'], true, "on"); echo "<table width='100%'><tr valign='middle'><td class='tbl1' width='40%' align='center'>" . $locale['gs65'] . "<br /><img src='" . INFUSIONS . "al_groups/images/voteshare.gif' border='0' /></td><td class='tbl1' align='center'><textarea name='guyhubcg' class='textbox' rows='4' cols='30'><a href=\"" . $settings['siteurl'] . "group.php?view=" . $group['group_id'] . "&voteshare\" target=\"_blank\" alt=\"Vote!\"><img src=\"" . $settings['siteurl'] . "al_groups/images/voteshare.gif\" border=\"0\" /></a></textarea></td></tr></table>"; closeside(); } else { redirect(BASEDIR . "groups.php"); } require_once THEMES . "templates/footer.php";