function editConfigSource($content, $option) { $config_path = JPATH_SITE . '/components/com_joomla_lms/includes/config.inc.php'; ?> <script type="text/javascript"> <!-- function submitbutton(pressbutton) { var form = document.adminForm; form.page.value = pressbutton; form.submit(); } <?php if (JLMS_J16version()) { ?> Joomla.submitbutton = submitbutton; <?php } ?> //--> </script> <form action="index.php" method="post" name="adminForm"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td valign="top" width="220px"> <div> <?php echo joomla_lms_adm_html::JLMS_menu(); ?> </div> </td> <td valign="top"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td width="290"> <?php if (!class_exists('JToolBarHelper')) { ?> <table class="adminheading"><tr><th class="config"><?php echo _JOOMLMS_COMP_NAME . ': <small>DEV.config</small>'; ?> </th></tr></table> <?php } ?> </td> <td width="220"> <span class="componentheading">config.inc.php is : <b><?php echo is_writable($config_path) ? '<font color="green"> ' . _JLMS_WRITABLE . '</font>' : '<font color="red"> ' . _JLMS_UNWRITABLE . '</font>'; ?> </b> </span> </td> <?php if (mosIsChmodable($config_path)) { if (is_writable($config_path)) { ?> <td> <input type="checkbox" id="disable_write" name="disable_write" value="1"/> <label for="disable_write"><?php echo _JLMS_CFG_MSG_UNWR_AFTER_SAVE; ?> </label> </td> <?php } else { ?> <td> <input type="checkbox" id="enable_write" name="enable_write" value="1"/> <label for="enable_write"><?php echo _JLMS_CFG_MSG_OVERRIDE_PROTT; ?> </label> </td> <?php } // if } // if ?> </tr> </table> <div class="width-100"> <fieldset class="adminform"> <table > <tr><th><?php echo $config_path; ?> </th></tr> <tr><td><textarea style="width:100%;height:500px" cols="110" rows="25" name="filecontent" class="inputbox"><?php echo $content; ?> </textarea></td></tr> </table> </fieldset> </div> </td> </tr> </table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="dev_config" /> <input type="hidden" name="page" value="save_config" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
function editItem(&$row, &$lists, &$roles, $option) { ?> <script language="javascript" type="text/javascript"> <!-- function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { form.page.value = pressbutton; form.submit(); return; } if (pressbutton == 'save' || pressbutton == 'apply' ) { form.page.value = pressbutton; form.submit(); return; } } <?php if (JLMS_J16version()) { ?> Joomla.submitbutton = submitbutton; <?php } ?> //--> </script> <form action="index.php" method="post" name="adminForm"> <table width="100%" > <tr> <td valign="top" width="220px"> <div> <?php echo joomla_lms_adm_html::JLMS_menu(); ?> </div> </td> <td valign="top"> <?php if (!class_exists('JToolBarHelper')) { ?> <table class="adminheading"> <tr> <th class="user"> <?php echo _JOOMLMS_COMP_NAME; ?> : <small> <?php echo $row->id ? _JLMS_FRM_EDIT_BOARD : _JLMS_FRM_NEW_BOARD; ?> </small> </th> </tr> </table> <?php } ?> <div class="width-100"> <fieldset class="adminform"> <table width="100%" border="0"> <tr> <td valign="top"> <table width="100%" > <tr> <th colspan="2"><?php echo _JLMS_FRM_BOARD_DETS; ?> </th> <tr> <tr> <td align="left" width="20%"><?php echo _JLMS_FRM_BOARD_NAME; ?> :</td> <td><input class="text_area" type="text" name="forum_name" style="width:266px;" maxlength="100" value="<?php echo str_replace('"', '"', $row->forum_name); ?> " /></td> </tr> <tr> <td align="left"><?php echo _JLMS_PUBLISHED; ?> :</td> <td><fieldset class="radio"><?php echo $lists['published']; ?> </fieldset></td> </tr> <tr> <td align="left"><?php echo _JLMS_FRM_PARENT_BOARD; ?> :</td> <td><?php echo $lists['parent_forums']; ?> </td> </tr> <tr> <td align="left"><?php echo _JLMS_FRM_TYPE; ?> :</td> <td><?php echo $lists['forum_type']; ?> </td> </tr> <tr> <td align="left"><?php echo _JLMS_FRM_SET_OWN_AS_MOD; ?> :</td> <td><fieldset class="radio"><?php echo $lists['moderated']; ?> </fieldset></td> </tr> <tr> <td align="left"><?php echo _JLMS_FRM_ADD_BOARD_MOD; ?> :</td> <td><input class="text_area" type="text" name="forum_moderators" style="width:50px;" maxlength="100" value="<?php echo str_replace('"', '"', $row->forum_moderators); ?> " /></td> </tr> <tr> <td align="left" valign="top"><?php echo _JLMS_FRM_BOARD_DESC; ?> :</td> <td> <textarea class="text_area" name="forum_desc" style="width:266px" cols="35" rows="3"><?php echo $row->forum_desc; ?> </textarea> </td> </tr> <tr> <td align="left" colspan="2"><?php echo _JLMS_FRM_YOU_CAN_USE; ?> </td> </tr> <tr> <th colspan="2"><?php echo _JLMS_FRM_ADV_ACC_PERMS; ?> </th> <tr> <tr> <td align="left" valign="top" style="vertical-align:top "><?php echo _JLMS_FRM_ADV_ACC; ?> :</td> <td><fieldset class="radio"><?php echo $lists['custom_access']; ?> </fieldset></td> </tr> <tr> <td align="left" valign="top"><?php echo _JLMS_FRM_ADD_PERM; ?> :</td> <td> <?php echo '<select id="roles_selections" class="text_area" multiple="multiple" style="width:266px" size="10" name="forum_permissions[]">'; $prev_roletype = 0; $cur_permissions = explode(',', $row->forum_permissions); foreach ($roles as $role) { if ($role->roletype_id != $prev_roletype) { if ($prev_roletype) { echo '</optgroup>'; } $prev_roletype = $role->roletype_id; if ($role->roletype_id == 4) { echo '<optgroup label="Administrator roles">'; } if ($role->roletype_id == 2) { echo '<optgroup label="Teacher roles">'; } if ($role->roletype_id == 5) { echo '<optgroup label="Assistant roles">'; } } $selected = ''; if (in_array($role->value, $cur_permissions)) { $selected = ' selected="selected"'; } echo '<option value="' . $role->value . '"' . $selected . '>' . $role->text . '</option>'; } echo '</optgroup>'; echo '</select>'; ?> </td> </tr> </table> <br /> </td> </tr> </table> </fieldset> </div> </td></tr></table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="task" value="lms_forums" /> <input type="hidden" name="page" value="" /> </form> <?php }
function JLMS_results_check_database($option, $out = array(), $end = '', $flag_stop = '', $flag_check_tables = '') { ?> <script type="text/javascript"> <!-- function submitbutton(pressbutton) { var form = document.adminForm; form.page.value = pressbutton; form.submit(); } <?php if (JLMS_J16version()) { ?> Joomla.submitbutton = submitbutton; <?php } ?> //--> </script> <form action="index.php" method="post" name="adminForm"> <table width="100%" border="0"> <tr> <td valign="top" width="220px"> <div> <?php echo joomla_lms_adm_html::JLMS_menu(); ?> </div> </td> <td valign="top"> <?php if (!class_exists('JToolBarHelper')) { ?> <table class="adminheading"> <tr> <tr> <th class="config"> <?php echo _JOOMLMS_COMP_NAME; ?> : <small><?php echo _JLMS_MAIN_CHECK_DB; ?> </small> </th> </tr> </table> <?php } ?> <div class="width-100"> <fieldset class="adminform"> <table width="100%" cellpadding="8" cellspacing="0" class="adminlist"> <thead> <tr> <th class="title" width="49%" align="left"><?php echo _JLMS_MAIN_TABLE; ?> </th> <th class="title" width="49%" align="left"><?php echo _JLMS_MAIN_STATUS; ?> </th> </tr> </thead> <?php if (!$flag_stop) { ?> <tfoot> <tr> <td align="center" colspan="2"> <?php echo str_replace('{link}', 'index.php?option=com_joomla_lms&task=lms_maintenance&page=check_database&table_num=' . $end, _JLMS_MAIN_IF_YOU_SEE); ?> </td> </tr> </tfoot> <?php } elseif ($flag_stop != 2) { ?> <tfoot> <tr> <td align="center" colspan="2"> <?php echo str_replace('{link}', 'index.php?option=com_joomla_lms&task=lms_maintenance&page=check_tables', _JLMS_MAIN_IF_YOU_SEE); ?> </td> </tr> </tfoot> <tbody> <?php } ?> <?php $kk = 0; for ($i = 0; $i < count($out); $i++) { foreach ($out[$i] as $k => $v) { $flag = 0; for ($j = 0; $j < count($v); $j++) { ?> <tr class="<?php echo "row{$kk}"; ?> "> <td align="left"><?php echo $k; ?> </td> <td align="left"><?php if ($v[$j + 1]) { echo "<font color=\"red\">" . $v[$j + 1] . "</font>"; } elseif ($v[$j]) { echo "<font color=\"green\">" . $v[$j] . "</font>"; } else { echo "OK"; } $j++; ?> </td> </tr><?php $flag = 1; $kk = 1 - $kk; } if ($flag == 0) { ?> <tr class="<?php echo "row{$kk}"; ?> "> <td align="left"><?php echo $k; ?> </td> <td align="left">OK</td> </tr><?php $kk = 1 - $kk; } } } ?> </tbody> </table> </fieldset> </div> </td></tr></table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="lms_maintenance" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="page" value="" /> </form> <script type="text/javascript"> <?php if (!$flag_stop || $flag_check_tables) { if (!$flag_check_tables) { ?> var page = 'check_database'; <?php } else { ?> var page = 'check_tables'; <?php } ?> setTimeout('redirect()',5000); function redirect() { window.location="index.php?option=com_joomla_lms&task=lms_maintenance&page="+page+"&table_num=<?php echo $end; ?> "; } <?php } ?> //var winScroller = new Fx.Scroll(window); //winScroller.toBottom(); </script> <?php }
function JLMS_showDiscountCouponsStatistics($rows, $pageNav, $option) { ?> <form action="index.php" method="post" name="adminForm"> <table width="100%" > <tr> <td valign="top" width="220"> <div> <?php echo joomla_lms_adm_html::JLMS_menu(); ?> </div> </td> <td valign="top"> <?php if (!class_exists('JToolBarHelper')) { ?> <table class="adminheading" cellpadding="0" cellspacing="0" border="0"> <tr> <th class="categories"> <?php echo _JOOMLMS_COMP_NAME; ?> : <small><?php echo _JLMS_DISC_C_U_STATS; ?> </small> </th> </tr> </table> <?php } ?> <table width="100%" border="0"> <tr> <td valign="top"> <table class="adminlist"> <thead> <tr> <th width="20">#</th> <th width="20" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> );" /></th> <th class="title"><?php echo _JLMS_DISC_C_CODE; ?> </th> <th class="title"><?php echo _JLMS_USERNAME; ?> </th> <th class="title"><?php echo _JLMS_NAME; ?> </th> <th class="title"><?php echo _JLMS_EMAIL; ?> </th> <th class="title"><?php echo _JLMS_DATE; ?> </th> <th class="title"><?php echo _JLMS_DISC_PAY_ID; ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="11"> <?php echo $pageNav->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row = $rows[$i]; $checked = '<input type="checkbox" id="cb' . $i . '" name="cid[]" value="' . $row->id . '" onclick="isChecked(this.checked);" />'; if ($row->coupon_id) { $coupon_link = '<a href="index.php?option=com_joomla_lms&task=editA_discount_coupon&id=' . $row->coupon_id . '" title="' . _JLMS_DISC_VIEW_C . '">' . $row->coupon_code . '</a>'; } else { $coupon_link = $row->code; } if ($row->payment_id) { $payment_link = '<a href="index.php?option=com_joomla_lms&task=editA_payment&id=' . $row->payment_id . '" title="' . _JLMS_DISC_VIEW_C . '">' . $row->payment_id . '</a>'; } else { $payment_link = $row->payment_id; } ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="center" width="20"><?php echo $pageNav->getRowOffset($i); ?> </td> <td><?php echo $checked; ?> </php></td> <td align="center"> <?php echo $coupon_link; ?> </td> <td align="center"><?php echo $row->username; ?> </td> <td align="center"><?php echo $row->name; ?> </td> <td align="center"><?php echo $row->email; ?> </td> <td align="center"><?php echo $row->date; ?> </td> <td align="center"> <?php echo $payment_link; ?> </td> </tr> <?php $k = 1 - $k; } ?> </tbody> </table> </td> </tr> </table> </td> </tr> </table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="discount_coupons_statistics" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> </form> <?php }
function editItem(&$row, &$lists, $option) { ?> <script language="javascript" type="text/javascript"> <!-- function jlms_changeUserSelect(c_e) { var sel_value = c_e.options[c_e.selectedIndex].value; var sel1 = c_e.form.user_name; for (var i = 0; i < sel1.options.length; i++) { if (sel1.options[i].value == sel_value) { sel1.options[i].selected = true; } } var sel2 = c_e.form.user_email; for (var i = 0; i < sel2.options.length; i++) { if (sel2.options[i].value == sel_value) { sel2.options[i].selected = true; } } var sel3 = c_e.form.user_id; for (var i = 0; i < sel3.options.length; i++) { if (sel3.options[i].value == sel_value) { sel3.options[i].selected = true; } } } function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { form.page.value = pressbutton; form.submit(); return; } var sel_value = form.<?php echo $lists['view_by'] ? 'role_id' : 'lms_usertype_id'; ?> .options[form.<?php echo $lists['view_by'] ? 'role_id' : 'lms_usertype_id'; ?> .selectedIndex].value; <?php if (!$lists['user_id']) { echo ' var sel_user = form.user_id.options[form.user_id.selectedIndex].value;'; } ?> if (sel_value == 0 || sel_value == '0') { alert('<?php echo _JLMS_USERS_SCLT_USR_ROLE; ?> ') <?php if (!$lists['user_id']) { echo ' } else if (sel_user == 0 || sel_user == \'0\') {' . "\n"; echo ' alert(\'' . _JLMS_USERS_SCLT_USR . '\');'; } ?> } else { form.page.value = pressbutton; form.submit(); return; } } <?php if (JLMS_J16version()) { ?> Joomla.submitbutton = submitbutton; <?php } ?> //--> </script> <form action="index.php" method="post" name="adminForm"> <table width="100%" > <tr> <td valign="top" width="220px"> <div> <?php echo joomla_lms_adm_html::JLMS_menu(); ?> </div> </td> <td valign="top"> <?php if (!class_exists('JToolBarHelper')) { ?> <table class="adminheading"> <tr> <th class="user"> <?php echo _JOOMLMS_COMP_NAME; ?> : <small> <?php echo $row->id ? _JLMS_USERS_EDIT_USER : _JLMS_USERS_NEW_USER; ?> </small> </th> </tr> </table> <?php } ?> <div class="width-100"> <fieldset class="adminform"> <table width="100%" border="0"> <tr> <td valign="top"> <table width="100%" > <tr> <th colspan="2"><?php echo _JLMS_USERS_USR_DETS; ?> </th> <tr> <?php if ($lists['user_id']) { ?> <tr> <td align="right" width="20%"><?php echo _JLMS_USER; ?> :</td> <td><?php echo $lists['user_info']; ?> </td> </tr> <?php } else { ?> <tr> <td align="right" width="20%"><?php echo _JLMS_USERS_SLCT_USRNAME; ?> :</td> <td><?php echo $lists['users']; ?> </td> </tr> <tr> <td align="right" width="20%"><?php echo _JLMS_USERS_OR_NAME; ?> :</td> <td><?php echo $lists['users_names']; ?> </td> </tr> <tr> <td align="right" width="20%"><?php echo _JLMS_USERS_OR_EMAIL; ?> :</td> <td><?php echo $lists['users_emails']; ?> </td> </tr> <?php } ?> <tr> <td align="right" width="20%"><?php echo _JLMS_USERS_USER_ROLE; ?> :</td> <td><?php echo $lists['roles']; ?> </td> </tr> <?php if ($lists['view_by']) { ?> <tr> <td align="right" width="20%"><?php echo _JLMS_USERS_CRS_NAME; ?> :</td> <td><?php echo $lists['course_name']; ?> </td> </tr> <?php } ?> </table> <br /> </td> </tr> </table> </fieldset> </div> </td></tr></table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="task" value="lms_users" /> <input type="hidden" name="course_id" value="<?php echo $lists['course_id']; ?> " /> <input type="hidden" name="view_by" value="<?php echo $lists['view_by']; ?> " /> <?php if ($lists['user_id']) { ?> <input type="hidden" name="user_id" value="<?php echo $lists['user_id']; ?> " /> <?php } ?> <input type="hidden" name="page" value="" /> </form> <?php }
function editItem(&$row, &$lists, $option, $redirect, $rows_groups) { ?> <script type="text/javascript"> <!-- function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { form.page.value = pressbutton; form.submit(); return; } var group_value = form.group_id.value; var user_value = form.user_id.value; if (group_value == 0) { alert( '<?php echo _JLMS_USERS_MSG_SLCT_ROLE; ?> ' ) } else if (user_value == 0) { alert('<?php echo _JLMS_USERS_MSG_SLCT_USER; ?> '); } else { form.page.value = pressbutton; form.submit(); return; } } <?php if (JLMS_J16version()) { ?> Joomla.submitbutton = submitbutton; <?php } ?> //--> </script> <form action="index.php" method="post" name="adminForm"> <table width="100%" > <tr> <td valign="top" width="220px"> <div> <?php echo joomla_lms_adm_html::JLMS_menu(); ?> </div> </td> <td valign="top"> <div class="width-100"> <fieldset class="adminform"> <?php if (!class_exists('JToolBarHelper')) { ?> <table class="adminheading"> <tr> <th class="user"> <?php echo _JOOMLMS_COMP_NAME; ?> : <small> <?php echo $row->user_id ? _JLMS_USERS_EDIT_MNGR : _JLMS_USERS_NEW_MNGR; ?> </small> </th> </tr> </table> <?php } ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> <table width="100%" > <tr> <th colspan="2"><?php echo _JLMS_USERS_USR_DETS; ?> </th> <tr> <?php if ($row->user_id) { ?> <tr> <td align="right" width="20%"><?php echo _JLMS_USER; ?> :</td> <td><?php echo $row->username . ' , ' . $row->name . '(' . $row->email . ')'; ?> </td> </tr> <?php } ?> <tr> <td align="right" width="20%"><?php echo _JLMS_USERS_SLCT_USR_GR; ?> :</td> <td><?php echo $lists['ug_names']; ?> </td> </tr> <?php if (!$row->user_id) { ?> <tr> <td align="right" width="20%"><?php echo _JLMS_USERS_SLCT_USR; ?> :</td> <td><?php echo $lists['users_names']; ?> </td> </tr> <?php } ?> </table> </td> </tr> <?php if (count($rows_groups)) { ?> <tr> <td valign="top"> <table class="adminlist"> <thead> <tr> <th class="title" width="100%"><?php echo _JLMS_USERS_MANGD_GR_LIST; ?> </th> </tr> </thead> <?php $k = 0; for ($i = 0, $n = count($rows_groups); $i < $n; $i++) { $row1 = $rows_groups[$i]; ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="left"> <?php echo $row1->ug_name; ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> </td> </tr> <?php } ?> </table> </td></tr> </table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="group_managers" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="page" value="" /> <input type="hidden" name="redirect" value="<?php echo $redirect; ?> " /> <?php if ($row->user_id) { ?> <input type="hidden" name="user_id" value="<?php echo $row->user_id; ?> " /> <input type="hidden" name="old_group_id" value="<?php echo $row->group_id; ?> " /> <input type="hidden" name="edit_manager" value="1" /> <?php } ?> </fieldset> </div> </form> <?php }
function editItem(&$row, &$lists, &$text_permisions, &$permissions, $option) { global $is_jlms_trial_roles_heading_text; ?> <script language="javascript" type="text/javascript"> <!-- function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { form.page.value = pressbutton; form.submit(); return; } var sel_value = form.roletype_id.options[form.roletype_id.selectedIndex].value; var role_name = form.lms_usertype.value; if (sel_value == 0 || sel_value == '0') { alert('<?php echo _JLMS_ROLES_MSG_SELECT_ROLE_TYPE; ?> ') } else if (!role_name) { alert( '<?php echo _JLMS_ROLES_MSG_ENTER_ROLE_NAME; ?> ' ) } else { form.page.value = pressbutton; form.submit(); return; } } <?php if (JLMS_J16version()) { ?> Joomla.submitbutton = submitbutton; <?php } ?> //extra BrustersIceCream // function JLMS_ceostore_trigger(e){ // var form = document.adminForm; // // if(e.checked && e.name == 'permissions[ceo][store_manager]'){ // form['permissions[ceo][corporate_admin]'][0].checked = true; // form['permissions[ceo][corporate_admin]'][1].checked = false; // } // if(e.checked && e.name == 'permissions[ceo][corporate_admin]'){ // form['permissions[ceo][store_manager]'][0].checked = true; // form['permissions[ceo][store_manager]'][1].checked = false; // } // } //--> </script> <form action="index.php" method="post" name="adminForm"> <table width="100%" > <tr> <td valign="top" width="220px"> <div> <?php echo joomla_lms_adm_html::JLMS_menu(); ?> </div> </td> <td valign="top"> <div class="width-100"> <fieldset class="adminform"> <?php if (!class_exists('JToolBarHelper')) { ?> <table class="adminheading"> <tr> <th class="user"> <?php echo _JOOMLMS_COMP_NAME; ?> : <small> <?php echo $row->id ? _JLMS_ROLES_EDIT_USER_ROLE : _JLMS_ROLES_NEW_USER_ROLE; echo $is_jlms_trial_roles_heading_text ? $is_jlms_trial_roles_heading_text : ''; ?> </small> </th> </tr> </table> <?php } ?> <table width="100%" border="0"> <tr> <td valign="top"> <table width="100%" > <tr> <th colspan="2"><?php echo _JLMS_ROLES_USER_ROLE_DETAILS; ?> </th> <tr> <tr> <td align="right" width="20%"><?php echo _JLMS_ROLES_EDIT_ROLE_NAME; ?> :</td> <td><input type="text" name="lms_usertype" class="text_area" style="width:266px;" value="<?php echo $row->lms_usertype; ?> " /></td> </tr> <tr> <td align="right" width="20%"><?php echo _JLMS_ROLES_EDIT_ROLE_TYPE; ?> :</td> <td><?php echo $lists['role_type']; ?> </td> </tr> <?php if ($row->roletype_id == 2 || $row->roletype_id == 1) { ?> <tr> <td> Default Role: </td> <td> <table> <tr> <td> <input type="radio" name="default_role" value="0" <?php echo isset($row->default_role) && $row->default_role ? '' : 'checked="checked"'; ?> /> </td> <td> <?php echo _JLMS_NO; ?> </td> <td> <input type="radio" name="default_role" value="1" <?php echo isset($row->default_role) && $row->default_role ? 'checked="checked"' : ''; ?> /> </td> <td> <?php echo _JLMS_YES; ?> </td> </tr> </table> </td> </tr> <?php } ?> </table> <br /> </td> </tr> </table> <table width="100%" border="0"> <tr> <td valign="top"> <table width="100%" > <tr> <th><?php echo _JLMS_ROLES_ROLE_PERM; ?> </th> </tr> <tr> <td> <?php if (count($permissions)) { $old_key = ''; foreach ($permissions as $key => $tmp_prms) { if ($key != $old_key) { $onclick_ceo_check = ''; /*if($key == 'ceo'){ $onclick_ceo_check = 'onclick="JLMS_ceostore_trigger(this);"'; }*/ ?> <fieldset> <legend> <?php echo strtoupper($key); ?> </legend> <table > <?php $tmp_step_permisions = $tmp_prms; $k = 1; foreach ($tmp_step_permisions as $text_prms => $tmp_step_prms) { ?> <tr class="row<?php echo $k; ?> "> <td width="20%"> <?php $text_info_permission = isset($text_permisions[$key]->{$text_prms}) ? $text_permisions[$key]->{$text_prms} : '<i>' . $text_prms . '</i>'; echo $text_info_permission . ':'; ?> </td> <td> <table> <tr> <td> <input type="radio" <?php echo $onclick_ceo_check; ?> name="<?php echo 'permissions' . '[' . $key . ']' . '[' . $text_prms . ']'; ?> " value="0" <?php echo isset($tmp_step_prms) && $tmp_step_prms ? '' : 'checked="checked"'; ?> /> </td> <td> <?php echo _JLMS_NO; ?> </td> <td> <input type="radio" <?php echo $onclick_ceo_check; ?> name="<?php echo 'permissions' . '[' . $key . ']' . '[' . $text_prms . ']'; ?> " value="1" <?php echo isset($tmp_step_prms) && $tmp_step_prms ? 'checked="checked"' : ''; ?> /> </td> <td> <?php echo _JLMS_YES; ?> </td> </tr> </table> </td> </tr> <?php $k = 1 - $k; } ?> </table> </fieldset> <?php } $old_key = $key; } } else { echo _JLMS_ROLES_MSG_SLCT_ROLE_T; } ?> </td> </tr> </table> <br /> </td> </tr> </table> </fieldset> </div> </td> </tr> </table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="task" value="lms_roles" /> <input type="hidden" name="page" value="" /> </form> <?php }