Ejemplo n.º 1
0
    function showindoptions(&$rows, $optgrid, $productid)
    {
        // shows individual options
        $og = new optiongroups();
        $og->load($optgrid);
        ?>
        <form name="frmindoptions" method="post" action="index.php">
		<table border="1" class="adminform" width="100%"><tr><th colspan="2"><?php 
        echo JText::_('SC_OPTIONS');
        ?>
</th></tr>
		<tr>
		<td width="185"><?php 
        echo stripslashes(JText::_('SC_OPTIONS_TITLE'));
        ?>
</td>
		<td>
        <?php 
        echo $og->title;
        ?>
		</td>
		</tr>
        <tr>
        <td>&nbsp;</td>
        <td align="right"><input type="submit" name="submit" value="<?php 
        echo JText::_('SC_SAVE');
        ?>
" /></td>
        </tr>
		<tr>
		<td><?php 
        echo stripslashes(JText::_('SC_IND_OPTIONS'));
        ?>
		</td>
		<td>
        
			<input type="button" name="addbtn" onclick="addRow()" value="<?php 
        echo JText::_('Add Option');
        ?>
" />&nbsp;<input type="button" name="delbtn" onclick="deleteRow()" value="<?php 
        echo JText::_('Remove option');
        ?>
" />
			<table id="mine" border="1" class="adminform">
			<tr><th width="20">#</th><th width="40"><?php 
        echo JText::_('Description');
        ?>
</th><th width="40"><?php 
        echo JText::_('Formula');
        ?>
</th><th width="40"><?php 
        echo JText::_('Caption');
        ?>
</th><th width="20"><?php 
        echo JText::_("Display order");
        ?>
</th><th width="80"><?php 
        echo JText::_('Default select');
        ?>
</th><th>&nbsp;</th></tr>
			<?php 
        foreach ($rows as $key => $line) {
            echo "<tr>";
            echo "<td><input type='checkbox' name='tid{$key}' id='tid{$key}' value='{$line->id}'></td>";
            echo "<td><input type='hidden' name='optionid[]' value='{$line->id}'><input type='text' size='30' name='optionshorttext[]' value='{$line->description}' ></td>";
            echo "<td><input type='text' name='optionformula[]' value='{$line->formula}' ></td>";
            echo "<td><input type='text' name='optioncaption[]' value='{$line->caption}' ></td>";
            echo "<td><input type='text' name='optiondisporder[]' value='{$line->disporder}' size='1'></td>";
            echo "<td><input type='radio' name='optiondefselect' value='{$key}' " . ($line->defselect == "1" ? "checked" : "") . "></td>";
            echo "</tr>";
        }
        ?>

			</table>
			<input type="hidden" name="rows" value="" id="rows" />
			<input type="hidden" name="rows2" value="" id="rows2" />
		</td>
		</tr>
		</table>
		<input type="hidden" name="option" value="com_caddy" />
		<input type="hidden" name="optgrid" value="<?php 
        echo $optgrid;
        ?>
" />
		<input type="hidden" name="productid" value="<?php 
        echo $productid;
        ?>
" />
		<input type="hidden" name="action" value="options" />
		<input type="hidden" name="task" value="saveoptions" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0" />
		</form>
        <?php 
    }