Example #1
0
    public static function runde(&$row, $lists, $option)
    {
        CLMViewRunden::setRundeToolbar($row->sid);
        JRequest::setVar('hidemainmenu', 1);
        JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'extrainfo');
        $cliga = intval(JRequest::getVar('liga'));
        // Liga-Parameter holen
        $db = JFactory::getDBO();
        $sql = "SELECT params FROM #__clm_liga as l" . " WHERE l.id = " . $row->liga;
        $db->setQuery($sql);
        $tparams = $db->loadObjectList();
        //Liga-Parameter aufbereiten
        $paramsStringArray = explode("\n", $tparams[0]->params);
        $lparams = array();
        foreach ($paramsStringArray as $value) {
            $ipos = strpos($value, '=');
            if ($ipos !== false) {
                $key = substr($value, 0, $ipos);
                if (substr($key, 0, 2) == "\\'") {
                    $key = substr($key, 2, strlen($key) - 4);
                }
                if (substr($key, 0, 1) == "'") {
                    $key = substr($key, 1, strlen($key) - 2);
                }
                $lparams[$key] = substr($value, $ipos + 1);
            }
        }
        if (!isset($lparams['round_date'])) {
            //Standardbelegung
            $lparams['round_date'] = '0';
        }
        ?>
	<script language="javascript" type="text/javascript">

		 Joomla.submitbutton = function (pressbutton) { 		
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			// do field validation
			if (form.name.value == "") {
				alert( "<?php 
        echo JText::_('RUNDE_NAME_ANGEBEN', true);
        ?>
" );
			} else if (form.nr.value == "") {
				alert( "<?php 
        echo JText::_('RUNDE_NUMMER_ANGEBEN', true);
        ?>
" );
			} else if (form.datum.value == "") {
				alert( "<?php 
        echo JText::_('RUNDE_DATE_ANGEBEN', true);
        ?>
" );
			} else if ( getSelectedValue('adminForm','sid') == 0 ) {
				alert( "<?php 
        echo JText::_('RUNDE_SAISON_AUSWAEHLEN', true);
        ?>
" );
			} else if ( getSelectedValue('adminForm','liga') == 0 ) {
				alert( "<?php 
        echo JText::_('RUNDE_LIGA_AUSWAEHLEN', true);
        ?>
" );
			} else {
				submitform( pressbutton );
			}
		}
		</script>

		<form action="index.php" method="post" name="adminForm" id="adminForm">

		<div class="width-50 fltlft">
		<fieldset class="adminform">
		<legend><?php 
        echo JText::_('RUNDE_DETAILS');
        ?>
</legend>

		<table class="admintable">
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RUNDE') . ' : ';
        ?>
</label>
			</td>
			<td>
			<input class="inputbox" type="text" name="name" id="name" size="30" maxlength="60" value="<?php 
        echo $row->name;
        ?>
" />
			</td>
		</tr>

		<tr>
			<td class="key" nowrap="nowrap">
			<label for="nr"><?php 
        echo JText::_('RUNDE_NR') . ' : ';
        ?>
</label>
			</td>
			<td>
			<input class="inputbox" type="text" name="nr" id="nr" size="5" maxlength="5" value="<?php 
        echo $row->nr;
        ?>
" />
			</td>
		</tr>

		   <tr>
            		<td width="100" class="key">
                	<label for="datum">
                    	<?php 
        echo JText::_('RUNDE_SPIELTAG') . ' : ';
        ?>
                	</label>
            		</td>
            		<td>
                	<?php 
        echo JHtml::_('calendar', $row->datum, 'datum', 'datum', '%Y-%m-%d', array('class' => 'text_area', 'size' => '12', 'maxlength' => '19'));
        ?>
            		</td>
        	</tr>
	<?php 
        if ($lparams['round_date'] == '0') {
            ?>
		<tr>
			<td class="key" nowrap="nowrap">
				<label for="startzeit" >
					<span class="editlinktip hasTip" title="<?php 
            echo JText::_('RUNDE_STARTTIME_HINT');
            ?>
">
					<?php 
            echo JText::_('RUNDE_STARTTIME') . ' : ';
            ?>
</span>
				</label>
			</td>
			<td>
			<input class="inputbox" type="time" name="startzeit" id="startzeit" size="8" maxlength="10" value="<?php 
            echo substr($row->startzeit, 0, 5);
            ?>
"  />
			</td>
        </tr>
	<?php 
        }
        if ($lparams['round_date'] == '1') {
            ?>
	   <tr>
           	<td width="100" class="key">
               	<label for="enddatum">
                  	<?php 
            echo JText::_('RUNDE_ENDDATUM') . ' : ';
            ?>
               	</label>
           	</td>
           	<td>
				<?php 
            if ($row->enddatum < '1970-01-02' and $row->datum > '1970-01-01') {
                $row->enddatum = $row->datum;
            }
            ?>
               	<?php 
            echo JHtml::_('calendar', $row->enddatum, 'enddatum', 'enddatum', '%Y-%m-%d', array('class' => 'text_area', 'size' => '12', 'maxlength' => '19'));
            ?>
			</td>
   		</tr>
	<?php 
        }
        ?>
		<tr>
       		<td width="100" class="key">
               	<label for="deadlineday">
					<span class="editlinktip hasTip" title="<?php 
        echo JText::_('RUNDE_DEADLINEDAY_HINT');
        ?>
">
                   	<?php 
        echo JText::_('RUNDE_DEADLINEDAY') . ' : ';
        ?>
               	</label>
       		</td>
       		<td>
               	<?php 
        echo JHtml::_('calendar', $row->deadlineday, 'deadlineday', 'deadlineday', '%Y-%m-%d', array('class' => 'text_area', 'size' => '12', 'maxlength' => '19'));
        ?>
				<input class="inputbox" type="time" name="deadlinetime" id="deadlinetime" size="8" maxlength="10" value="<?php 
        echo substr($row->deadlinetime, 0, 5);
        ?>
"  />
       		</td>
       	</tr>
		<tr>
			<td class="key" nowrap="nowrap"><label for="sid"><?php 
        echo JText::_('RUNDE_SAISON') . ' : ';
        ?>
</label>
			</td>
			<td>
			<?php 
        echo $lists['saison'];
        ?>
			</td>
		</tr>

		<tr>
			<td class="key" ><label for="liga"><?php 
        echo JText::_('RUNDE_LIGA') . ' : ';
        ?>
</label>
			</td>
			<td>
			<?php 
        echo $lists['liga'];
        ?>
			</td>
		</tr>

		<tr>
			<td class="key" nowrap="nowrap"><label for="verein"><?php 
        echo JText::_('RUNDE_MELDUNG_MOEGLICH') . ' : ';
        ?>
</label>
			</td>
			<td><fieldset class="radio">
			<?php 
        echo $lists['complete'];
        ?>
			</fieldset></td>
		</tr>

		<tr>
			<td class="key" nowrap="nowrap"><label for="mf"><?php 
        echo JText::_('RUNDE_SL_FREIGABE') . ' : ';
        ?>
</label>
			</td>
			<td><fieldset class="radio">
			<?php 
        echo $lists['slok'];
        ?>
			</fieldset></td>
		</tr>
		
		<tr>
			<td class="key" nowrap="nowrap"><label for="published"><?php 
        echo JText::_('JPUBLISHED') . ' : ';
        ?>
</label>
			</td>
			<td><fieldset class="radio">
			<?php 
        echo $lists['published'];
        ?>
			</fieldset></td>
		</tr>


		</table>
		</fieldset>
		</div>

 <div class="width-50 fltrt">
  <fieldset class="adminform">
   <legend><?php 
        echo JText::_('REMARKS');
        ?>
</legend>
	<table class="adminlist">
	<legend><?php 
        echo JText::_('REMARKS_PUBLIC');
        ?>
</legend>
	<br>
	<tr>
	<td width="100%" valign="top">
	<textarea class="inputbox" name="bemerkungen" id="bemerkungen" cols="40" rows="5" style="width:90%"><?php 
        echo str_replace('&', '&amp;', $row->bemerkungen);
        ?>
</textarea>
	</td>
	</tr>
	</table>

	<table class="adminlist">
	<tr><legend><?php 
        echo JText::_('REMARKS_INTERNAL');
        ?>
</legend>
	<br>
	<td width="100%" valign="top">
	<textarea class="inputbox" name="bem_int" id="bem_int" cols="40" rows="5" style="width:90%"><?php 
        echo str_replace('&', '&amp;', $row->bem_int);
        ?>
</textarea>
	</td>
	</tr>
	</table>
  </fieldset>
  </div>


		<div class="clr"></div>

		<input type="hidden" name="section" value="runden" />
		<input type="hidden" name="option" value="com_clm" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
<!---		<input type="hidden" name="cid" value="<?php 
        //echo $row->cid;
        ?>
" />
		<input type="hidden" name="client_id" value="<?php 
        //echo $row->cid;
        ?>
" />
--->		<input type="hidden" name="task" value="" />
		<input type="hidden" name="slok_old" value="<?php 
        echo $row->sl_ok;
        //klkl
        ?>
" /> 
		<?php 
        echo JHtml::_('form.token');
        ?>
		</form>
		<?php 
    }
Example #2
0
    function runde(&$row, $lists, $option)
    {
        CLMViewRunden::setRundeToolbar();
        JRequest::setVar('hidemainmenu', 1);
        JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'extrainfo');
        ?>
	<script language="javascript" type="text/javascript">
		<!--
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			// do field validation
			if (form.name.value == "") {
				alert( "<?php 
        echo JText::_('RUNDE_NAME_ANGEBEN', true);
        ?>
" );
			} else if (form.nr.value == "") {
				alert( "<?php 
        echo JText::_('RUNDE_NUMMER_ANGEBEN', true);
        ?>
" );
			} else if (form.datum.value == "") {
				alert( "<?php 
        echo JText::_('RUNDE_DATE_ANGEBEN', true);
        ?>
" );
			} else if ( getSelectedValue('adminForm','sid') == 0 ) {
				alert( "<?php 
        echo JText::_('RUNDE_SAISON_AUSWAEHLEN', true);
        ?>
" );
			} else if ( getSelectedValue('adminForm','liga') == 0 ) {
				alert( "<?php 
        echo JText::_('RUNDE_LIGA_AUSWAEHLEN', true);
        ?>
" );
			} else {
				submitform( pressbutton );
			}
		}
		//-->
		</script>

		<form action="index.php" method="post" name="adminForm">

		<div class="col width-50">
		<fieldset class="adminform">
		<legend><?php 
        echo JText::_('RUNDE_DETAILS');
        ?>
</legend>

		<table class="admintable">
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RUNDE') . ' : ';
        ?>
</label>
			</td>
			<td>
			<input class="inputbox" type="text" name="name" id="name" size="50" maxlength="60" value="<?php 
        echo $row->name;
        ?>
" />
			</td>
		</tr>

		<tr>
			<td class="key" nowrap="nowrap">
			<label for="contact"><?php 
        echo JText::_('RUNDE_NR') . ' : ';
        ?>
</label>
			</td>
			<td>
			<input class="inputbox" type="text" name="nr" id="nr" size="50" maxlength="60" value="<?php 
        echo $row->nr;
        ?>
" />
			</td>
		</tr>

		   <tr>
            		<td width="100" align="right" class="key">
                	<label for="datum">
                    	<?php 
        echo JText::_('DATE');
        ?>
:
                	</label>
            		</td>
            		<td>
                	<?php 
        echo JHTML::_('calendar', $row->datum, 'datum', 'datum', '%Y-%m-%d', array('class' => 'text_area', 'size' => '32', 'maxlength' => '19'));
        ?>
            		</td>
        		</tr>

		<tr>
			<td class="key" nowrap="nowrap"><label for="sid"><?php 
        echo JText::_('RUNDE_SAISON') . ' : ';
        ?>
</label>
			</td>
			<td>
			<?php 
        echo $lists['saison'];
        ?>
			</td>
		</tr>

		<tr>
			<td class="key" ><label for="liga"><?php 
        echo JText::_('RUNDE_LIGA') . ' : ';
        ?>
</label>
			</td>
			<td>
			<?php 
        echo $lists['liga'];
        ?>
			</td>
		</tr>

		<tr>
			<td class="key" nowrap="nowrap"><label for="verein"><?php 
        echo JText::_('RUNDE_MELDUNG_MOEGLICH') . ' : ';
        ?>
</label>
			</td>
			<td>
			<?php 
        echo $lists['complete'];
        ?>

			</td>
		</tr>

		<tr>
			<td class="key" nowrap="nowrap"><label for="mf"><?php 
        echo JText::_('RUNDE_SL_FREIGABE') . ' : ';
        ?>
</label>
			</td>
			<td>
			<?php 
        echo $lists['slok'];
        ?>
			</td>
		</tr>
		
		<tr>
			<td class="key" nowrap="nowrap"><label for="published"><?php 
        echo JText::_('PUBLISHED') . ' : ';
        ?>
</label>
			</td>
			<td>
			<?php 
        echo $lists['published'];
        ?>
			</td>
		</tr>


		</table>
		</fieldset>
		</div>

 <div class="col width-50">
  <fieldset class="adminform">
   <legend><?php 
        echo JText::_('RUNDE_BEMERKUNGEN');
        ?>
</legend>
	<table class="adminlist">
	<legend><?php 
        echo JText::_('RUNDE_OEFFENTLICH');
        ?>
</legend>
	<br>
	<tr>
	<td width="100%" valign="top">
	<textarea class="inputbox" name="bemerkungen" id="bemerkungen" cols="40" rows="5" style="width:90%"><?php 
        echo str_replace('&', '&amp;', $row->bemerkungen);
        ?>
</textarea>
	</td>
	</tr>
	</table>

	<table class="adminlist">
	<tr><legend><?php 
        echo JText::_('RUNDE_INTERN');
        ?>
</legend>
	<br>
	<td width="100%" valign="top">
	<textarea class="inputbox" name="bem_int" id="bem_int" cols="40" rows="5" style="width:90%"><?php 
        echo str_replace('&', '&amp;', $row->bem_int);
        ?>
</textarea>
	</td>
	</tr>
	</table>
  </fieldset>
  </div>


		<div class="clr"></div>

		<input type="hidden" name="section" value="runden" />
		<input type="hidden" name="option" value="com_clm" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="cid" value="<?php 
        echo $row->cid;
        ?>
" />
		<input type="hidden" name="client_id" value="<?php 
        echo $row->cid;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="slok_old" value="<?php 
        echo $row->sl_ok;
        //klkl
        ?>
" /> 
		<?php 
        echo JHTML::_('form.token');
        ?>
		</form>
		<?php 
    }