wie könnte man das umsetzen die kommtare der Zusagen und Absagen für die Nextwars mit einem Datum/Zeit zu versehen?
ich glaube das kann man in der Wars machen oder? hat einer ne idee?
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
# eine zu bzw. absage loeschen if ( $menu->get(3) == 'delete' AND ((has_right(array($row['tid'])) === true AND $uid == $_SESSION['authid']) OR is_siteadmin('wars')) AND $ck == 1) { db_query("DELETE FROM prefix_warmember WHERE wid = ".$_GET['mehr']." AND uid = ".$uid ); $ck = 0; } $available = db_count_query("SELECT COUNT(uid) FROM prefix_warmember WHERE wid = ".$_GET['mehr']." AND aktion = 1"); $aout1 = array ( 'needed' => $needed, 'available' => $available, 'id' => $_GET['mehr'] ); $tpl->set_ar_out($aout1,1); if ( $ck == 0 AND has_right(array($row['tid'])) === true) { if ( isset ($_POST['sub']) ) { $aktion = ( $_POST['sub'] == 'zusagen' ? 1 : 0 ); $kom = escape($_POST['kom'],'string'); db_query("INSERT INTO prefix_warmember (uid,wid,aktion,kom,wann) VALUES (".$_SESSION['authid'].",".$_GET['mehr'].",".$aktion.",'".$kom."',".time().")"); } else { $tpl->out(2); } } $class = ''; $aktionar = array ('<font style="color:#FF0000; background:#666666; font-weight:bold;">abgesagt</font>','<font style="font-weight:bold; color:#00FF00; background:#666666;">zugesagt</font>'); $erg1 = db_query("SELECT b.id as uid, b.name, a.aktion, a.kom, a.wann FROM prefix_warmember a left join prefix_user b ON b.id = a.uid WHERE a.wid = ".$_GET['mehr']); while ($row1 = db_fetch_assoc($erg1) ) { if ( $class == 'Cmite' ) { $class = 'Cnorm'; } else { $class = 'Cmite'; } $row1['class'] = $class; $row1['aktion'] = $aktionar[$row1['aktion']]; $row1['wann'] = date('H:i:s - d M Y ',$row1['wann']); if ( $row1['uid'] == $_SESSION['authid'] OR is_siteadmin('wars')) { $row1['name'] = '<a href="index.php?wars-more-'.$_GET['mehr'].'-delete-'.$row1['uid'].'"><img src="include/images/icons/del.gif" border="0" title="löschen" /></a> '.$row1['name']; } $tpl->set_ar_out($row1,3); } } $tpl->out(4);
<?php defined ('main') or die ( 'no direct access' ); echo '<table width="100%" border="1" cellpadding="2" cellspacing="1" bgcolor="#00C0C0" >'; $akttime = date('Y-m-d'); $erg = @db_query("SELECT DATE_FORMAT(datime,'%d.%m.%y - %H:%i') as time,tag,mod,gegner, id, game FROM prefix_wars WHERE status = 2 AND datime > '".$akttime."' ORDER BY datime"); if ( @db_num_rows($erg) == 0 ) { echo '<tr><td>kein War geplant</td></tr>'; } else { while ($row = @db_fetch_object($erg) ) { $mod = ''; $row2['reg']=''; $hat = 'have'; $row->tag = ( empty($row->tag) ? $row->gegner : $row->tag ); $mod = explode('on',$row->mod); $result = db_query("SELECT COUNT(*)as reg FROM prefix_warmember WHERE wid = ".$row->id." AND aktion = 1") ; $row2 = db_fetch_assoc($result); if($row2['reg']<=1){$hat = 'hat';} echo '<tr><td>'.get_wargameimg($row->game).'</td></tr><tr>'; echo '<td><a class="box" href="index.php?wars-more-'.$row->id.'">'; echo $row->time.' - '.$row->tag.'</a></td></tr><tr><td>There '.$hat.' now '.$row2['reg'].' of '.$mod['0'].' Member registerd</td></tr>'; } } echo '</table>'; ?>
# eine zu bzw. absage loeschen if ( $menu->get(3) == 'delete' AND ((has_right(array($row['tid'])) === true AND $uid == $_SESSION['authid']) OR is_siteadmin('wars')) AND $ck == 1) { db_query("DELETE FROM prefix_warmember WHERE wid = ".$_GET['mehr']." AND uid = ".$uid ); $ck = 0; } $available = db_count_query("SELECT COUNT(uid) FROM prefix_warmember WHERE wid = ".$_GET['mehr']." AND aktion = 1"); $aout1 = array ( 'needed' => $needed, 'available' => $available, 'id' => $_GET['mehr'] ); $tpl->set_ar_out($aout1,1); if ( $ck == 0 AND has_right(array($row['tid'])) === true) { if ( isset ($_POST['sub']) ) { $aktion = ( $_POST['sub'] == 'zusagen' ? 1 : 0 ); $kom = escape($_POST['kom'],'string'); db_query("INSERT INTO prefix_warmember (uid,wid,aktion,kom,wann) VALUES (".$_SESSION['authid'].",".$_GET['mehr'].",".$aktion.",'".$kom."',".time().")"); } else { $tpl->out(2); } } $class = ''; $aktionar = array ('<font style="color:#FF0000; background:#666666; font-weight:bold;">abgesagt</font>','<font style="font-weight:bold; color:#00FF00; background:#666666;">zugesagt</font>'); $erg1 = db_query("SELECT b.id as uid, b.name, a.aktion, a.kom, a.wann FROM prefix_warmember a left join prefix_user b ON b.id = a.uid WHERE a.wid = ".$_GET['mehr']); while ($row1 = db_fetch_assoc($erg1) ) { if ( $class == 'Cmite' ) { $class = 'Cnorm'; } else { $class = 'Cmite'; } $row1['class'] = $class; $row1['aktion'] = $aktionar[$row1['aktion']]; $row1['wann'] = date('H:i:s - d M Y ',$row1['wann']); if ( $row1['uid'] == $_SESSION['authid'] OR is_siteadmin('wars')) { $row1['name'] = '<a href="index.php?wars-more-'.$_GET['mehr'].'-delete-'.$row1['uid'].'"><img src="include/images/icons/del.gif" border="0" title="löschen" /></a> '.$row1['name']; } $tpl->set_ar_out($row1,3); } } $tpl->out(4);
<td><b>{name}</b> {_lang_had} {aktion} <u>{_lang_comment}:</u> {kom} {wann}</td>
Geschlossen | ||
Zurück zu Module und Modifikationen |