Beispiel #1
0
 function generate_options($filecats = '', $offset = '', $subcatID = 0)
 {
     $rubrics = safe_query("SELECT * FROM " . PREFIX . "files_categorys WHERE subcatID = '" . $subcatID . "' ORDER BY name");
     while ($dr = mysql_fetch_array($rubrics)) {
         $filecats .= '<option value="' . $dr['filecatID'] . '">' . $offset . htmlspecialchars($dr['name']) . '</option>';
         if (mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "files_categorys WHERE subcatID = '" . $dr['filecatID'] . "'"))) {
             $filecats .= generate_options("", $offset . "- ", $dr['filecatID']);
         }
     }
     return $filecats;
 }
Beispiel #2
0
    </td>
  </tr>
  <tr>
    <td><label>Birthday:</label></td>
    <td>
    <div class="input-container">
    <select name="month"><option value="0">Month:</option><?php 
echo generate_options(1, 12, 'callback_month');
?>
</select>
    <select name="day"><option value="0">Day:</option><?php 
echo generate_options(1, 31);
?>
</select>
	<select name="year"><option value="0">Year:</option><?php 
echo generate_options(date('Y'), 1900);
?>
</select>
    </div>
    </td>
  </tr>
  <tr>
  <td>&nbsp;</td>
  <td><input type="submit" class="greenButton" value="Sign Up" /><img id="loading" src="img/ajax-loader.gif" alt="working.." />
</td>
  </tr>


  </tbody>
</table>
Beispiel #3
0
function generate_options($tree, $sep = '')
{
    $result = array();
    foreach ($tree as $node) {
        $result[$node['id']] = $sep . $node['name'];
        if (isset($node['children'])) {
            $result = $result + generate_options($node['children'], $sep . '&nbsp;&nbsp;');
        }
    }
    return $result;
}
Beispiel #4
0
function zopim_customize_widget()
{
    global $current_user;
    $ul = $current_user->data->first_name;
    $useremail = $current_user->data->user_email;
    $greetings = json_to_array(get_option('zopimGreetings'));
    $message = "";
    if (count($_POST) > 0) {
        update_option('zopimLang', $_POST["zopimLang"]);
        update_option('zopimPosition', $_POST["zopimPosition"]);
        update_option("zopimBubbleEnable", $_POST["zopimBubbleEnable"]);
        update_option('zopimColor', $_POST["zopimColor"]);
        update_option('zopimTheme', $_POST["zopimTheme"]);
        update_option('zopimBubbleTitle', stripslashes($_POST["zopimBubbleTitle"]));
        update_option('zopimBubbleText', stripslashes($_POST["zopimBubbleText"]));
        update_checkbox("zopimGetVisitorInfo");
        update_checkbox("zopimHideOnOffline");
        update_checkbox("zopimUseGreetings");
        update_checkbox("zopimUseBubble");
        if (isset($_POST['zopimUseGreetings']) && $_POST['zopimUseGreetings'] != "") {
            $greetings->online->window = stripslashes($_POST["zopimOnlineLong"]);
            $greetings->online->bar = stripslashes($_POST["zopimOnlineShort"]);
            $greetings->away->window = stripslashes($_POST["zopimAwayLong"]);
            $greetings->away->bar = stripslashes($_POST["zopimAwayShort"]);
            $greetings->offline->window = stripslashes($_POST["zopimOfflineLong"]);
            $greetings->offline->bar = stripslashes($_POST["zopimOfflineShort"]);
            update_option('zopimGreetings', to_json($greetings));
        }
        $message = "<b>Changes saved!</b><br>";
    }
    zopimme();
    $accountDetails = getAccountDetails(get_option('zopimSalt'));
    if (get_option('zopimCode') == "zopim") {
        $message = '<div class="metabox-holder">
	<div class="postbox">
		<h3 class="hndle"><span>Customizing in Demo Mode</span></h3>
		<div style="padding:10px;line-height:17px;">
			Currently customizing in demo mode. Messages in this widget will go to Zopim staff. The chat widget will not appear on your site until you <a href="admin.php?page=zopim_account_config">activate / link up an account</a>. <br>
		</div>
	</div>
		</div>';
        $accountDetails->widget_customization_enabled = 1;
        $accountDetails->color_customization_enabled = 1;
    } else {
        if (isset($accountDetails->error)) {
            $message = '<div class="metabox-holder">
								<div class="postbox">
								<h3 class="hndle"><span>Account no longer linked!</span></h3>
								<div style="padding:10px;line-height:17px;">
									We could not connect to your Zopim account. As a result, this customization page is running in demo mode.<br> Please <a href="admin.php?page=zopim_account_config">check your password in account setup</a> and try again.
								</div>
								</div>
								</div>';
        } else {
            $message .= "Click 'Save Changes' when you're done. Happy customizing!";
        }
    }
    // unset($accountDetails->widget_customization_enabled);
    // unset($accountDetails->color_customization_enabled);
    ?>

	<script type="text/javascript">

	function updateWidget() {
		var lang = document.getElementById('zopimLang').options[ document.getElementById('zopimLang').options.selectedIndex ].value;
		$zopim.livechat.setLanguage(lang);

		if (document.getElementById("zopimGetVisitorInfo").checked) {
			$zopim.livechat.setName('<?php 
    echo $ul;
    ?>
');
			$zopim.livechat.setEmail('<?php 
    echo $useremail;
    ?>
');
		}
		else {
			$zopim.livechat.setName('Visitor');
			$zopim.livechat.setEmail('');
		}

		document.getElementById("zopimHideOnOffline").checked? $zopim.livechat.button.setHideWhenOffline(true): $zopim.livechat.button.setHideWhenOffline(false);

		$zopim.livechat.window.setColor(document.getElementById("zopimColor").value);
		$zopim.livechat.window.setTheme(document.getElementById("zopimTheme").value);

		if (document.getElementById("zopimUseBubble").checked) {
			$zopim.livechat.bubble.setTitle(document.getElementById("zopimBubbleTitle").value);
			$zopim.livechat.bubble.setText(document.getElementById("zopimBubbleText").value);
		}
		else {
			$zopim.livechat.bubble.setTitle('Questions?');
			$zopim.livechat.bubble.setText('Click here to chat with us!');
		}

		$zopim.livechat.setGreetings({
			'online':  [document.getElementById("zopimOnlineShort").value, document.getElementById("zopimOnlineLong").value],
			'offline': [document.getElementById("zopimOfflineShort").value, document.getElementById("zopimOfflineLong").value],
			'away':    [document.getElementById("zopimAwayShort").value, document.getElementById("zopimAwayLong").value]
		});
	}

	function updatePosition() {
		var position = document.getElementById('zopimPosition').options[ document.getElementById('zopimPosition').options.selectedIndex ].value;
		$zopim.livechat.button.setPosition(position);
	}

	function updateBubbleStatus() {
		var value = document.getElementById("zopimBubbleEnable").value;
		switch (value) {
			case 'default':
				$zopim.livechat.bubble.reset();
				break;
			case 'show':
				$zopim.livechat.bubble.show();
				break;
			case 'hide':
				$zopim.livechat.bubble.hide();
				break;
		}
	}

	function greetingsChanged() {
		var inputs     = [ 'zopimOnlineShort', 'zopimAwayShort', 'zopimOfflineShort',
											 'zopimOnlineLong' , 'zopimAwayLong', 'zopimOfflineLong' ];
		var isDisabled = false;

		document.getElementById('zopimUseGreetings').checked? (isDisabled = false): (isDisabled = true);

		for (var i=0; i<inputs.length; i++) {
			document.getElementById(inputs[i]).disabled = isDisabled;
		}

		updateWidget();
	}

	function bubbleChanged() {
		var inputs     = [ 'zopimBubbleTitle', 'zopimBubbleText' ];
		var isDisabled = false;

		document.getElementById('zopimUseBubble').checked? (isDisabled = false): (isDisabled = true);

		for (var i = 0; i < inputs.length; i++) {
			document.getElementById(inputs[i]).disabled = isDisabled;
		}

		updateWidget();
	}

	var timer;
	function updateSoon() {
		clearTimeout(timer);
		timer = setTimeout("updateWidget()", 300);
	}

	</script>

<style type="text/css">
.smallExplanation {
background:#FAFAFA;
color:#667788;
font-size:8pt;
line-height:13px;
margin:4px 0 0 0;
padding:8px;
display: inline-block;
}
.inputtextshort {
width:200px;
}
.inputtext {
width:450px;
}
.secthead {
border-bottom:1px solid #EEEEEE;
color:#8899AA;
font-size:13px;
line-height:21px;
}
.sethead {
	width:200px;
}
.swatch {
	float: left;
	width: 15px
}
.swatch:hover {
	background-image:url(http://www.zopim.com/static/images/colorselectbg.gif);
	cursor:pointer;
}
.sorry {
	color:#c33;
}
</style>

<div class="wrap">
<div id="icon-themes" class="icon32"><br/></div><h2>Customize your widget</h2>

<?php 
    echo $message;
    ?>
<form method="post" action="admin.php?page=zopim_customize_widget">
<div class="metabox-holder">
	<div class="postbox">
		<h3 class="hndle"><span>General Settings</span></h3>
		<div style="padding:10px;">
		<table class="form-table">
			<tr valign="top">
				<th scope="row" class="sethead">Language</th>
				<td>
					<select name="zopimLang" id="zopimLang" onchange="updateWidget()">
<?php 
    $languages = get_languages();
    echo generate_options($languages, get_option('zopimLang'));
    ?>
				</select>
				</td>
				</tr>
				<tr valign="top" style="display:none;">
				<th scope="row">Use Logged in Username / Email</th>
				<td><input onchange="updateWidget()" type="checkbox" id="zopimGetVisitorInfo" name="zopimGetVisitorInfo" value="zopimGetVisitorInfo" <?php 
    if (get_option('zopimGetVisitorInfo') != "disabled") {
        echo "checked='checked'";
    }
    ?>
 /></td>
				</tr>
				<tr valign="top">
				<th scope="row" class="sethead">Position</th>
				<td>

				<select name="zopimPosition" id="zopimPosition" onchange="updatePosition()">
<?php 
    $positions = array("br" => "Bottom Right", "bl" => "Bottom Left");
    echo generate_options($positions, get_option('zopimPosition'));
    ?>
				</select>
				</td>
				</tr>

				<tr valign="top">
				<th scope="row">Hide chat bar when offline<br>
				<!-- <div class="smallExplanation">Hide the chat bar when no agents are available to answer questions. This prevents visitors from sending you offline messages. </div>  -->
				</th>
					<td>
						<input onchange="updateWidget()" type="checkbox" id="zopimHideOnOffline" name="zopimHideOnOffline" value="zopimHideOnOffline" <?php 
    if (get_option('zopimHideOnOffline') && get_option('zopimHideOnOffline') != "disabled") {
        echo "checked='checked'";
    }
    ?>
 /> Prevents visitors from sending you offline messages
						<a href="#" onclick="$zopim.livechat.button.show();return false">(Show preview chat bar)</a>
					</td>
				</tr>
		</table>
		</div>
	</div>
</div>
<div class="metabox-holder">
	<div class="postbox">
		<h3 class="hndle"><span>Color & Theme Settings</span></h3>
		<div style="padding:10px;">
		Theme settings show up instantly on the preview widget. Try it out!<br/>
		<table class="form-table" style="width: 700px">
				<tr valign="top">
				<td colspan="2">
				<input type="hidden" id="zopimColor" name="zopimColor" value="<?php 
    echo get_option('zopimColor');
    ?>
">
<?php 
    if ($accountDetails->color_customization_enabled == 1) {
        echo "<div style='display:inline-block;border:11px solid #888;background:#888;color:#fee;'>";
        $colors = curl_get_url(ZOPIM_COLORS_LIST);
        $colors = explode("\n", $colors);
        $i = 0;
        foreach ($colors as $color) {
            echo "<div class='swatch' style='background-color: {$color};' onclick=\"document.getElementById('zopimColor').value='{$color}'; updateWidget();\">&nbsp</div>";
            if (++$i % 40 == 0) {
                echo "<br>";
            }
        }
        echo "<br><a href=# style='color:#ff8' onclick=\"document.getElementById('zopimColor').value=''; updateWidget();\">Restore default color</a></div>";
    } else {
        echo "<div class='sorry'>Sorry, your plan does not allow for color customization. Please upgrade to enjoy choice of color!</div>";
    }
    ?>
				</td>
				</tr>
				<tr valign="top">
				<th scope="row" class="sethead">Select A Theme</th>
				<td style="width: 400px"><div align="left">
<?php 
    if ($accountDetails->widget_customization_enabled == 1) {
        echo '<select name="zopimTheme" id="zopimTheme" onchange="updateWidget()">';
        $themes = curl_get_url(ZOPIM_THEMES_LIST);
        $themes = valuekeys(explode("\n", $themes));
        ksort($themes);
        echo generate_options($themes, get_option('zopimTheme'));
        echo "</select> <a href='#' onclick='\$zopim.livechat.window.toggle();return false;'>Open the chat panel</a> to see changes";
    } else {
        echo "<div class='sorry'>Sorry, your plan does not allow for theme customization. Please upgrade to enjoy choice of themes!</div>";
        echo '<input type=hidden value="" name="zopimTheme" id="zopimTheme">';
    }
    ?>
				</td>
				</tr>
		</table>
		</div>
	</div>
</div>

<?php 
    get_option('zopimUseBubble') && get_option('zopimUseBubble') != "disabled" ? $useBubble = true : ($useBubble = false);
    ?>
<div class="metabox-holder">
	<div class="postbox">
		<h3 class="hndle"><span>Help Bubble Settings</span></h3>
		<div style="padding:10px;">
		<table class="form-table">
			<tr valign="top">
				<th scope="row">Display Help Bubble<br></th>
				<td><select onchange="updateBubbleStatus()" type="checkbox" id="zopimBubbleEnable" name="zopimBubbleEnable"> <?php 
    $bubble_modes = array("default" => "Let user decide", "show" => "Always show", "hide" => "Always hide");
    echo generate_options($bubble_modes, get_option('zopimBubbleEnable'));
    ?>
	</select>
			</tr>
			<tr>
				<td colspan="2"><div class="secthead">Help Bubble Text</div></td>
			</tr>
			<tr>
				<td colspan="2"><input type="checkbox" id="zopimUseBubble" onchange="bubbleChanged()" value="zopimUseBubble" name="zopimUseBubble" <?php 
    if ($useBubble) {
        echo "checked='checked'";
    }
    ?>
/> Enable help bubble text settings (override dashboard settings) - save settings to view changes.</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="sethead">Help Bubble Title</th>
				<td><input class="inputtextshort" name="zopimBubbleTitle" id="zopimBubbleTitle" onKeyup="updateSoon()" value="<?php 
    echo get_option('zopimBubbleTitle');
    ?>
"  <?php 
    if (!$useBubble) {
        echo "disabled='disabled'";
    }
    ?>
><!-- <a href="#" onclick="updateBubbleStatus();">Refresh</a></td> -->
			</tr>
			<tr valign="top">
				<th scope="row" class="sethead">Help Bubble Message</th>
				<td><input class="inputtext" name="zopimBubbleText" id="zopimBubbleText" onKeyup="updateSoon()" value="<?php 
    echo get_option('zopimBubbleText');
    ?>
"  <?php 
    if (!$useBubble) {
        echo "disabled='disabled'";
    }
    ?>
></td>
			</tr>
		</table>
		</div>
	</div>
</div>

<?php 
    get_option('zopimUseGreetings') && get_option('zopimUseGreetings') != "disabled" ? $useGreetings = true : ($useGreetings = false);
    ?>
<div class="metabox-holder">
	<div class="postbox">
		<h3 class="hndle"><span>Greeting Message Settings</span></h3>
		<div style="padding:10px;">
		<table class="form-table">
			<tr>
				<td colspan="2"><input type="checkbox" id="zopimUseGreetings" onchange="greetingsChanged()" value="zopimUseGreetings" name="zopimUseGreetings" <?php 
    if ($useGreetings) {
        echo "checked='checked'";
    }
    ?>
/>	Enable greeting message settings (override dashboard settings) </td>
			</tr>
			<tr>
				<td colspan="2"><div class="secthead">Message Shown on Chat Bar (max 26 characters)</div></td>
			</tr>
			<tr valign="top">
				<th scope="row" class="sethead">Online</th>
				<td><input class="inputtextshort" name="zopimOnlineShort" id="zopimOnlineShort" onKeyup="updateSoon()" value="<?php 
    echo $greetings->online->bar;
    ?>
" <?php 
    if (!$useGreetings) {
        echo "disabled='disabled'";
    }
    ?>
 maxlength="26"></td>
			</tr>
			<tr valign="top">
				<th scope="row" class="sethead">Away</th>
				<td><input class="inputtextshort" name="zopimAwayShort" id="zopimAwayShort" onKeyup="updateSoon()"  value="<?php 
    echo $greetings->away->bar;
    ?>
"  <?php 
    if (!$useGreetings) {
        echo "disabled='disabled'";
    }
    ?>
  maxlength="26"></td>
			</tr>
			<tr valign="top">
				<th scope="row" class="sethead">Offline</th>
				<td><input class="inputtextshort" name="zopimOfflineShort" id="zopimOfflineShort" onKeyup="updateSoon()" value="<?php 
    echo $greetings->offline->bar;
    ?>
" <?php 
    if (!$useGreetings) {
        echo "disabled='disabled'";
    }
    ?>
  maxlength="26"></td>
			</tr>
			<tr>
				<td colspan="2"><div class="secthead">Message Shown on Chat Panel (max 140 characters)</div></td>
			</tr>
			<tr valign="top">
				<th scope="row" class="sethead">Online</th>
				<td><textarea class="inputtext" name="zopimOnlineLong" id="zopimOnlineLong" onKeyup="updateSoon()"  <?php 
    if (!$useGreetings) {
        echo "disabled='disabled'";
    }
    ?>
 ><?php 
    echo $greetings->online->window;
    ?>
</textarea></td>
			</tr>
			<tr valign="top">
				<th scope="row" class="sethead">Away</th>
				<td><textarea class="inputtext" name="zopimAwayLong" id="zopimAwayLong" onKeyup="updateSoon()" <?php 
    if (!$useGreetings) {
        echo "disabled='disabled'";
    }
    ?>
 ><?php 
    echo $greetings->away->window;
    ?>
</textarea></td>
			</tr>
			<tr valign="top">
				<th scope="row" class="sethead">Offline</th>
				<td><textarea class="inputtext" name="zopimOfflineLong" id="zopimOfflineLong" onKeyup="updateSoon()"  <?php 
    if (!$useGreetings) {
        echo "disabled='disabled'";
    }
    ?>
 ><?php 
    echo $greetings->offline->window;
    ?>
</textarea></td>
			</tr>
		</table>
		</div>
	</div>
</div>

<p class="submit">
	<input type="submit" class="button-primary" value="<?php 
    _e('Save Changes');
    ?>
" />
</p>

</form>
</div>

<?php 
}
		</span>
		
		<span id="forVir">
		Coordonn&eacute;es banquaire des Loupiots:<br/>
		RIB: 10278 08938 00041943240 87<br/>
		IBAN: FR76 1027 8089 3800 0419 4324 087<br/>
		BIC: CMCIFR2A<br/>
		</span>
		
		<label for="paymentMonth">Mois pay&eacute;</label>
		<select name="month"><option value="0">Mois:</option><?php 
echo generate_options(1, 12, 'callback_month');
?>
</select>
   		<select name="year"><?php 
echo generate_options(date('Y') + 1, 2010);
?>
</select>
	
		<span>
		<?php 
if (validation_errors()) {
    echo validation_errors();
}
?>
		</span>
		<input class="InputSubmit" type="submit" value="Enregistrer"/>
	
	</div>

</form>
    ?>
">
	   <tr>
		  <td class="inp">History Akademik</td>
		  <td><input name="nim" type="hidden" value="<?php 
    echo $biodata->NIM;
    ?>
" />
		  <label>
           <?php 
    echo form_dropdown('semester', generate_options($optionsSemester, 'ID', 'NAMA'));
    ?>
           </label>
		   <label>
           <?php 
    echo form_dropdown('tahun', generate_options($optionsTahun, 'ID', 'DESKRIPSI'));
    ?>
           </label>
		     &nbsp;<input class="button" type="submit" name="Submit" value="Proses" />
		   </td>
	   </tr>
	   </form>
       <tr align="left">
         <td class="inp">Dosen Pembimbing Akademik</td>
         <td><?php 
    echo $biodata->DOSEN_PEMBIMBING;
    ?>
</td>
       </tr>
       <tr align="left">
         <td class="inp">Kelompok Kelas</td>
 <?php 
    }
    ?>
                         <?php 
    echo '<option value="' . $p->ProgramID . '" ' . $selected . '>' . $p->ProgramID . ' - ' . $p->Nama . '</option>';
    ?>
                  <?php 
}
?>
                </select>
              </td>
            </tr>
            <tr height="35px">
              <td class="inp1">Jenis Angsuran</td>
              <td class="ul"><?php 
echo form_dropdown('tagihan', generate_options($options_tagihan, 'ID', 'DESKRIPSI', 'ori'), set_value('tagihan'));
?>
</td>
            </tr>
            <tr height="35px">
              <td class="inp1">Nominal Biaya</td>
              <td class="ul"><input type="text" maxlength="20" size="15" value="0" name="DefJumlah"></td>
            </tr>
            <tr>
              <td colspan="2" style="padding-top:30px">
                <input type="submit" class="sexybutton sexysimple sexygreen" value="Simpan" name="Simpan">
                <input type="reset" class="sexybutton sexysimple sexyblue" value="Reset" name="Reset">
                <input type="button" class="sexybutton sexysimple sexymagenta" onclick="location='<?php 
echo site_url('siku/inisiasi.html');
?>
'" value="Batal" name="Batal">
                </table>
                </div>
            </div>
        </div>
    </div>
</div>



</form>


<?php
if (!empty($data['script_option'])) {
    foreach ($data['script_option'] as $key => $value) {
        $script_options[$key] = generate_options($value, $data['option'], '', $data['orgs']);
    }
}
?>

<script>
function based_on(){
    switch(document.getElementById("data[based_on]").value)
    {
        <?php foreach ($script_options as $key => $value) { ?>
        case "<?php echo $key; ?>":
            based_on_text = '<?php echo $value; ?>';
        break;
        <?php } ?>
    }
    document.getElementById("options").innerHTML = based_on_text;
    	<?php 
echo form_dropdown('class_id', $classesOption, 1, 'class="InputSelect"');
?>
<br/>
 	
		<label for="birth">Date de naissance</label><br>
   		<select name="day"><option value="0">Jour:</option><?php 
echo generate_options(1, 31);
?>
</select>
		<select name="month"><option value="0">Mois:</option><?php 
echo generate_options(1, 12, 'callback_month');
?>
</select>
   		<select name="year"><option value="0">Annee:</option><?php 
echo generate_options(2015, 2000);
?>
</select>
	
		<span>
		<?php 
if (validation_errors()) {
    echo validation_errors();
}
?>
		</span>
		<input type="hidden" name="userId" value="<?php 
echo $userId;
?>
" />
		<input class="InputSubmit" type="submit" value="Enregistrer"/>
     <tbody>
       <tr>
         <td width="110" style="text-align:right">
           <input type="hidden" name="semester" value="<?php 
    echo $kontrol->KODE_SEMESTER;
    ?>
" /><input type="hidden" name="tahun" value="<?php 
    echo $kontrol->KODE_TAHUN;
    ?>
" />
           <label>Pilih Matakuliah</label></td>
         <td>:</td>
         <td>
           <label>
           <?php 
    echo form_dropdown('mk', generate_options($daftarMkPresensi, 'KODE_MK', 'NAMA_MK', 'ori'));
    ?>
           </label>
         </td>
       </tr>
       <tr>
		  <td colspan="3" align="center">&nbsp;<button class="sexybutton sexysimple" name="Submit" type="submit" value="Cari">Cari &raquo;</button></td>
	   </tr>
       </tbody>
       </form>
      </table>
   </div>
   <?php 
} elseif ($mhs == NULL && $daftarMkPresensi == NULL) {
    ?>
   <div style="width:500px">
 *
 * @copyright Copyright (c) 2014, Opmantek
 * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
 */
$orgs = $this->data['orgs'];
$options = $this->data['options'];
$options_scripts = $this->data['options_scripts'];
$files = '';
foreach ($this->response->data['files'] as $file) {
    $path = str_replace('\\', '\\\\', $file->path);
    $path = str_replace('/', '\/', $path);
    $files .= '<tr><td>' . $path . '</td><td><input type="checkbox" name="data[options][files][]" id="data[options][files][]" value="' . $path . '" checked /></td><td>Check to audit this file or folder.</td></tr>';
}

foreach ($options_scripts as $key => $value) {
    $script_options[$key] = generate_options($value, $options, $files, $orgs);
}

function generate_options($option_list, $options, $files, $orgs) {
    $return = '<table width="100%">';
    foreach ($options as $option) {
        foreach ($option_list as $list_item) {
            if ($list_item == $option->name) {
                $return .= '<tr><td>' . $option->name . '</td>';
                
                switch ($option->type) {
                    case 'text';
                    case 'number';
                    case 'url';
                    case 'date':
                        if ($option->name != 'org_id') {
<?php

$tahun_kirim = $this->session->flashdata('tahun_kirim');
echo form_dropdown('tahun', generate_options($optionsTahun, 'ID', 'DESKRIPSI'), set_value('tahun', isset($tahun_kirim) ? $tahun_kirim : ''), 'id="so_tahun"');
<br />
<div align="center">
   <div class="data_mhs">
     <div style="width:580px">
       <div align="left" style="margin-top:5px;font-family:arial; font-size: 2.5em; color: #F0F0F0; letter-spacing: -3px;">
         <img src="<?php 
    echo site_url("images/2asalsklh.png");
    ?>
 " />
       </div>
     </div>
     <table class="uiTableList" cellpadding="5" cellspacing="0" border="0">
       <tr align="left">
          <td width="180">Propinsi Asal SMA</td>
          <td width="380"><?php 
    echo form_dropdown('asal_sma', generate_options($select_options_sma, 'ID', 'DESKRIPSI', 'ori'), set_value('asal_sma', isset($biodata->ID_ASAL_SMA) ? $biodata->ID_ASAL_SMA : ''));
    ?>
</td>
       </tr>
     </table>
   </div>
</div>
<br />
<div align="center">
   <div class="data_mhs">
     <div style="width:580px">
       <div align="left" style="margin-top:5px;font-family:arial; font-size: 2.5em; color: #F0F0F0; letter-spacing: -3px;">
         <img src="<?php 
    echo site_url("images/3dataklg.png");
    ?>
 " />
              <td class="ul"><input type="text" maxlength="50" size="40" value="<?php 
echo set_value('keterangan', isset($potongan->KETERANGAN) ? $potongan->KETERANGAN : '');
?>
" name="keterangan"></td>
            </tr>
            <tr>
              <td class="inp1">Nominal Potongan</td>
              <td class="ul"><input type="text" maxlength="20" size="15" value="<?php 
echo set_value('DefJumlah', isset($potongan->POTONGAN) ? $potongan->POTONGAN : '');
?>
" name="DefJumlah"></td>
            </tr>
            <tr>
              <td class="inp1">Jenis Angsuran</td>
              <td class="ul"><?php 
echo form_dropdown('tagihan', generate_options($options_tagihan, 'ID', 'DESKRIPSI', 'ori'), set_value('tagihan', isset($potongan->ID_TAGIHAN) ? $potongan->ID_TAGIHAN : ''));
?>
</td>
            </tr>
            <tr>
              <td colspan="2">
                <input type="submit" class="sexybutton sexysimple sexygreen" value="Simpan" name="Simpan">
                <input type="reset" class="sexybutton sexysimple sexyblue" value="Reset" name="Reset">
                <input type="button" class="sexybutton sexysimple sexymagenta" onclick="location='<?php 
echo site_url('siku/PotonganSpp/' . $biodata->NIM . '.do');
?>
'" value="Batal" name="Batal">
              </td>
            </tr>
            </tbody>
          </table>
 /><br />

<label for="class">Classe</label> <?php 
echo form_dropdown('class_id', $classesOption, $classId, 'class="InputSelect"');
?>
<br />

<label for="birth">Date de naissance</label><br>
	<?php 
echo form_dropdown('day', generate_options(1, 31), $day, 'class="InputSelect"');
?>
	<?php 
echo form_dropdown('month', generate_options(1, 12, 'callback_month'), $month, 'class="InputSelect"');
?>
	<?php 
echo form_dropdown('year', generate_options(2000, date('Y')), $year, 'class="InputSelect"');
?>

<span> <?php 
if (validation_errors()) {
    echo validation_errors();
}
?>
 </span> <input type="hidden" name="userId" value="<?php 
echo $userId;
?>
" /> 
	<input type="hidden" name="childId" value="<?php 
echo $child['id'];
?>
" /> 
	<br class="clear"/>


<div class="content">

 <form style="display: inline; margin: 0;" method="post" action="<?php 
echo site_url('siku/kirim-tagihan.html');
?>
">

 <table cellpadding="0" border="0" width="394px" style="margin-left: 15px">
    <tbody>
    <tr align="left">
      <td height="30px"><b>Pilih Semester</b></td>
      <td width="250px"><?php 
echo form_dropdown('semester', generate_options($optionsSemester, 'ID', 'NAMA', 'ori'), set_value('semester'));
?>
</td>
    </tr>
    <tr align="left">
      <td><b>Pilih Tahun Ajaran</b></td>
      <td>
        <?php 
$this->load->view('select_options_tahun');
?>
      </td>
    </tr>
    </tbody>
 </table>

 <?php 
					<div style="float:left;padding: 6px 12px 2px 16px;">
						<select name="year"  id="selectUser" style="width:auto;" class="form-control">
						<option value="0">Year</option><?php 
    echo generate_options(1963, 2015);
    ?>
						</select>

						<select name="month"  id="selectUser" style="width:auto;" class="form-control">
						<option value="0">Month</option><?php 
    echo generate_options(1, 12);
    ?>
						</select>

						<select name="day"  id="selectUser" style="width:auto;" class="form-control">
						<option value="0">Day</option><?php 
    echo generate_options(1, 31);
    ?>
						</select>
					</div>
			</div>

			<div class="form-group"> 
				<label class="control-label col-sm-2">Email</label>
					<div class="col-lg-8">
						<input type="text" name="email" class="form-control" placeholder="Email">
					</div>
			</div>

			<div class="form-group">
				<label class="control-label col-sm-2">Contact No.</label>
					<div class="col-lg-8">