$plans_list = array(); $sql = "SELECT * FROM {{panellist_answer}} WHERE panellist_id = '" . $_SESSION['plid'] . "'"; $pl_answer = Yii::app()->db->createCommand($sql)->query()->readAll(); foreach ($pl_answer as $key => $value) { foreach ($value as $ky => $val) { $plans_list[$ky] = $val; } } $quelist = Question(get_question_categoryid('Registration'), '', false, true); foreach ($quelist as $key => $value) { if ($plans_list['question_id_' . $key] == '') { $ok = 1; break; } } $quelist = Question(get_question_categoryid('Profile'), '', false, true); foreach ($quelist as $key => $value) { if ($plans_list['question_id_' . $key] == '') { $ok = 1; break; } } if ($ok == 1) { $sty = 'visibility: hidden;'; } else { $sty = ''; } $sts_test = getGlobalSetting('project_status_test'); $sts_run = getGlobalSetting('project_status_run'); $date = date('Y-m-d'); $sql = "SELECT COUNT(*) AS cnt FROM {{panellist_project}} pp \n LEFT JOIN {{project_master}} pm ON pp.project_id = pm.project_id\n WHERE (project_status_id = '{$sts_test}' OR project_status_id = '{$sts_run}') \n AND trueup IS NULL AND panellist_id = '" . $_SESSION['plid'] . "' AND STATUS = 'A'";
} echo '<tr>'; $odd = !$odd; } ?> </table> </p> </div> <div class="box w98_per effect7"> <h3>Profile Details</h3> <p> <table class="InfoForm" style="width: 95%; margin: 0px auto;"> <?php $odd = FALSE; $quelist = Question(get_question_categoryid('Profile'), '', false, true); $quetype = Question(get_question_categoryid('Profile'), '', true, false); foreach ($quelist as $key => $value) { if ($odd) { $cls = 'class="odd"'; } else { $cls = 'class="even"'; } echo '<tr ' . $cls . '> <td>' . $value . '</td>'; if ($quetype[$key] == 'Text' || $quetype[$key] == 'DOB' || $quetype[$key] == 'TextArea') { echo '<td>' . $plans_list['question_id_' . $key] . '</td>'; } else { echo '<td>' . get_answer($plans_list['question_id_' . $key], $key) . '</td>'; } echo '<tr>'; $odd = !$odd;
?> <?php echo Question(['question' => 'La capacidad del estudiante frente a la búsqueda de información acertada para la resolución y optimización de problemas es: <span class="b">(Proposición)</span>', 'num' => ++$s, 'name' => ++$r, 'slider' => true, 'options' => ['Excelente', 'Bueno', 'Aceptable', 'Deficiente']]); ?> <?php echo Question(['question' => 'La capacidad investigativa del estudiante orientada al desarrollo de procesos innovadores es: <span class="b">(Argumentación)</span>', 'num' => ++$s, 'name' => ++$r, 'slider' => true, 'options' => ['Excelente', 'Bueno', 'Aceptable', 'Deficiente']]); ?> <?php echo Question(['question' => 'La capacidad de síntesis coherente de los resultados obtenidos en el desarrollo de sus actividades o funciones, por parte del estudiante es: <span class="b">(Síntesis)</span>', 'num' => ++$s, 'name' => ++$r, 'slider' => true, 'options' => ['Excelente', 'Bueno', 'Aceptable', 'Deficiente']]); ?> <?php echo Question(['question' => 'El interés demostrado por el estudiante frente al aprendizaje de nuevos conceptos es: <span class="b">(Actualización)</span>', 'num' => ++$s, 'name' => ++$r, 'slider' => true, 'options' => ['Excelente', 'Bueno', 'Aceptable', 'Deficiente']]); ?> <div class="form-group"> <div class="row"><label class="col-sm-7 control-label">Observaciones:</label> </div> <div class="col-lg-12"> <textarea name="OBS_SABERSABER" style="height: 120px;margin-top:5px;" placeholder="Ingrese la observación del saber saber (opcional)" class="form-control" maxlength="750"></textarea> </div> </div> <?php echo br(3); ?> <!--Envíar-->
function print_pl_view_data($r) { ?> <div id="tabs-1" class="tabcontent ui-tabs-panel ui-widget-content ui-corner-bottom"> <h4 id="popup_title" class="popup_title" style="text-align: center;">Viewing details of <?php echo $r['full_name']; ?> </h4> <table width="100%" border="0" cellpadding="5" id="invDetail" class="InfoForm"> <tbody> <tr class="even gradeC" style="font-weight:bold;"> <td>RR%</td> <td>Invited</td> <td>Redirected</td> <td>Completed</td> <td>Disqualified</td> <td>Quota Full</td> <td>Earned Points</td> <td>Balance Points</td> </tr> <tr class="odd gradeC"> <td><?php echo getPanelRR($r['panel_list_id']); ?> %</td> <td><?php echo $r['no_invited']; ?> </td> <td><?php echo $r['no_redirected']; ?> </td> <td><?php echo $r['no_completed']; ?> </td> <td><?php echo $r['no_disqualified']; ?> </td> <td><?php echo $r['no_qfull']; ?> </td> <td><?php echo $r['earn_points']; ?> </td> <td><?php echo $r['balance_points']; ?> </td> </tr> </tbody> </table> <br> <h2>General Information</h2> <?php $pl_details = $plans_list = array(); $sql = "SELECT * FROM {{view_panel_list_master}} WHERE panel_list_id = '" . $r['panel_list_id'] . "'"; $pl_details = Yii::app()->db->createCommand($sql)->query()->readAll(); $sql = "SELECT * FROM {{panellist_answer}} WHERE panellist_id = '" . $r['panel_list_id'] . "'"; $pl_answer = Yii::app()->db->createCommand($sql)->query()->readAll(); foreach ($pl_answer as $key => $value) { foreach ($value as $ky => $val) { $plans_list[$ky] = $val; } } ?> <table class="InfoForm" style="width: 100%"> <tr class="even"> <td>Email Address</td> <td><?php echo $pl_details[0]['email']; ?> </td> </tr> <tr class="odd"> <td>Name</td> <td><?php echo $pl_details[0]['full_name']; ?> </td> </tr> <tr class="even"> <td>Status</td> <td> <?php if ($pl_details[0]['status'] == 'E') { echo 'Enabled'; } if ($pl_details[0]['status'] == 'D') { echo 'Disabled'; } if ($pl_details[0]['status'] == 'C') { echo 'Cancelled'; } if ($pl_details[0]['status'] == 'R') { echo 'Registered'; } ?> </td> </tr> <tr class="odd"> <td>Fraud</td> <td> <?php if ($pl_details[0]['is_fraud'] == '0') { echo 'No'; } if ($pl_details[0]['is_fraud'] == '1') { echo 'Yes'; } ?> </td> </tr> <?php $odd = FALSE; $quelist = Question(get_question_categoryid('Registration'), '', false, true); $quetype = Question(get_question_categoryid('Registration'), '', true, false); foreach ($quelist as $key => $value) { if ($odd) { $cls = 'class="odd"'; } else { $cls = 'class="even"'; } echo '<tr ' . $cls . '> <td>' . $value . '</td>'; if ($quetype[$key] == 'Text' || $quetype[$key] == 'DOB' || $quetype[$key] == 'TextArea') { echo '<td>' . $plans_list['question_id_' . $key] . '</td>'; } else { echo '<td>' . get_answer($plans_list['question_id_' . $key], $key) . '</td>'; } echo '<tr>'; $odd = !$odd; } ?> </table> <br> <h2>Professional Information</h2> <table class="InfoForm" style="width: 100%"> <?php $odd = FALSE; $quelist = Question(get_question_categoryid('Profile'), '', false, true); $quetype = Question(get_question_categoryid('Profile'), '', true, false); foreach ($quelist as $key => $value) { if ($odd) { $cls = 'class="odd"'; } else { $cls = 'class="even"'; } echo '<tr ' . $cls . '> <td>' . $value . '</td>'; if ($quetype[$key] == 'Text' || $quetype[$key] == 'DOB' || $quetype[$key] == 'TextArea') { echo '<td>' . $plans_list['question_id_' . $key] . '</td>'; } else { echo '<td>' . get_answer($plans_list['question_id_' . $key], $key) . '</td>'; } echo '<tr>'; $odd = !$odd; } ?> </table> </div> <?php }
placeholder="Ingrese una justificación a su respuesta"> </div> </div> </div> <?php echo br(2); ?> <p class="font1">1.3 Habilidades y competencias frente a la área de desempeño.</p> <br> <?php echo Question(['question' => 'En qué grado conoce Usted las competencias requeridas para las funciones o actividades a realizar', 'num' => '1.3.1', 'name' => ++$r, 'options' => ['Alto grado', 'Mediano grado', 'Bajo grado']]); ?> <?php echo Question(['question' => 'Cuál de las siguientes competencias considera Usted que tiene en mayor grado, para el desarrollo de las actividades o funciones establecidas', 'num' => '1.3.2', 'name' => ++$r, 'options' => ['Interpretativa', 'Argumentativa', 'Propositiva']]); ?> <?php echo br(2); ?> <p class="font1">DEBILIDADES Y/O FORTALEZAS</p> <?php echo form_input(['placeholder' => 'Ingrese las debilidades y/o fortalezas, luego presione la tecla enter', 'name' => 'DEBFOR', 'class' => 'debfor obligatorio', 'input' => ['col' => '12'], 'label' => ['col' => 0]], 'Responsabilidad'); ?> <?php echo br(2); ?> <p class="font1">METAS Y ESTRATEGIAS</p> <?php
public function DoRegistration() { $clang = Yii::app()->lang; $email_address = $_POST['email_address']; $pwd = $_POST['pwd']; //$spwd = hash('sha256', $pwd); $spwd = urlencode(base64_encode($pwd)); $fname = $_POST['fname']; $lname = $_POST['lname']; $aData['display'] = false; $aViewUrls = array(); if (PL::model()->find("email=:email", array(':email' => $email_address))) { // Yii::app()->setFlashMessage($clang->gT("Error in mail send")); //$aViewUrls['mboxwithredirect'][] = $this->_messageBoxWithRedirect($clang->gT("Failed to add Panellist"), $clang->gT("The Panellist Email already exists"), "warningheader", $clang->gT("The Panellist Email already exists"), $this->getController()->createUrl('/'), $clang->gT("Back"));//17/06/2014 Remove By Hari $aViewUrls['mboxwithredirect'][] = $this->_messageBoxWithRedirect($clang->gT("Failed to add Panellist"), $clang->gT("The Panellist Email already exists"), "warningheader", "", $this->getController()->createUrl('/'), $clang->gT("Back")); //17/06/2014 Add By Hari $this->_renderWrappedTemplate('', $aViewUrls, $aData); //Yii::app()->setFlashMessage($clang->gT("Error in mail send")); //$this->_redirectToIndex(); } $NewPanellist = PL::model()->insertPanellist($email_address, $spwd, $lname, $fname); if ($NewPanellist) { $quelist = Question(get_question_categoryid('Registration'), '', true, false); $sql = "INSERT INTO {{panellist_answer}} SET panellist_id = '{$NewPanellist}' "; foreach ($quelist as $key => $value) { if ($value == 'CheckBox') { $val = implode(',', $_POST[$key]); $sql .= ", question_id_{$key} = '" . $val . "'"; } elseif ($value == 'DOB') { $birthdate = date('Y-m-d', strtotime($_POST[$key])); $sql .= ", question_id_{$key} = '" . $birthdate . "'"; } else { $sql .= ", question_id_{$key} = '" . $_POST[$key] . "'"; } } $result = Yii::app()->db->createCommand($sql)->query(); $activation_id = generate_random(20); //$activation_link = Yii::app()->getBaseUrl(true) . '/index.php/pl/registration/sa/activate/c/' . $NewPanellist . '*' . $activation_id; $activation_link = Yii::app()->createAbsoluteUrl('pl/registration/sa/activate/c/' . $NewPanellist . '*' . $activation_id); $sql_code = "INSERT INTO {{activation_temp}}\n (panelllist_id,code,activation_type)\n VALUES('{$NewPanellist}','{$activation_id}','reg')"; $result = Yii::app()->db->createCommand($sql_code)->query(); $whitelist = array('127.0.0.1', '::1'); if (!in_array($_SERVER['REMOTE_ADDR'], $whitelist)) { $send = get_SendEmail::model()->SendEmailByTemplate($email_address, EMAIL_POINT_PL_Registration, $NewPanellist, array('pwd' => "{$pwd}", 'activation_link' => "{$activation_link}")); } else { echo $send = get_SendEmail::model()->SendEmailByTemplate($email_address, EMAIL_POINT_PL_Registration, $NewPanellist, array('pwd' => "{$pwd}", 'activation_link' => "{$activation_link}")); exit; } //$send = get_SendEmail::model()->SendEmailByTemplate($email_address, EMAIL_POINT_PL_Registration, $NewPanellist, array('pwd' => "$pwd", 'activation_link' => "$activation_link")); if (!$send) { echo 'Error'; Yii::app()->setFlashMessage($clang->gT("Error in mail send")); } $this->getController()->redirect(array("pl/registration/sa/process")); } }
?> <!-- Content Header (Page header) --> <section class="content-header"> <?php echo page_title(['ob' => $this, 'class' => 'fa fa-edit', 'text' => 'Diligenciar Asesoría Práctica']); ?> </section> <!-- Main content --> <div class="container"> <?php echo form_open('', ['class' => 'form-horizontal col-md-7', 'style' => 'margin-left: 15%']); ?> <hr style="border: 1px solid #099a5b;"/> <?php echo Question(['question' => 'Tipo:', 'name' => 1, 'options' => ['Asesoría: FUMC', 'Visita agencia']]); ?> <?php echo form_input(['name' => 'FECHA_HORA', 'id' => 'horafecha', 'class' => 'obligatorio fecha', 'required' => 'required', 'input' => ['col' => 5], 'label' => ['col' => 3, 'text' => 'Fecha y hora']], date('d/m/Y h:i a')); ?> <div class="form-group"> <div class="row"> <label for="inputID" class="col-sm-9 control-label">Desarrollo de la reunión de asesoría de prácticas:</label> </div> <div class="col-lg-12"> <textarea placeholder="Digite el desarrollo de la reunión de asesoría de prácticas (1500 máximos permitidos)" name="REUNION_ASESORIA" id="inputID" style="height: 400px;margin-top:5px;" class="form-control obligatorio" maxlength="1500" ></textarea> </div> </div> <!--Envíar--> <?php
function getPanelListAddForm() { $test = '<script> function Validationnew(){ var email = $("#email_address").val() var reemail = $("#remail_address").val() if(email != reemail){ alert("Email address not match". test); return false; }else{ return true; } } </script>'; $html = $test . CHtml::form(array("pl/registration/sa/save"), 'post', array('id' => 'usergroupform', 'enableClientValidation' => true, 'onsubmit' => 'javascript:return Validationnew()')) . '<table style="width: 100%; margin: 0px auto;color: black;"> <tr> <td style="text-align: left;padding-left: 4%;">Email Address</td> </tr> <tr> <td> <input type="email" placeholder="Email Address" name="email_address" id="email_address" required="required" /> </td> </tr> <tr> <td style="text-align: left;padding-left: 4%;">ReEmail Address</td> </tr> <tr> <td> <input type="email" placeholder="Re-Enter Email Address" name="remail_address" id="remail_address" required="required" /> </td> </tr> <tr> <td style="text-align: left;padding-left: 4%;">Password</td> </tr> <tr> <td> <input type="password" placeholder="Password" name="pwd" required="required" /> </td> </tr> <tr> <td style="text-align: left;padding-left: 4%;">First Name</td> </tr> <tr> <td> <input type="text" placeholder="First Name" name="fname" required="required" /> </td> </tr> <tr> <td style="text-align: left;padding-left: 4%;">Last Name</td> </tr> <tr> <td> <input type="text" placeholder="Last Name" name="lname" required="required" /> </td> </tr>'; $style = 'style="text-align: left;padding-left: 4%;"'; $html .= Question(get_question_categoryid('Registration'), $style); $html .= '<tr> <td> </td> </tr> <tr> <td> <input type="checkbox" required="required" /> I agree to the <a target = "_blank" href="index.php?pagename=Term" title="Term" style="background:rgba(0, 0, 0, 0.28)">Terms & Conditions</a> and <a target = "_blank" href="index.php?pagename=Privacy policy" title="Privacy policy" style="background:rgba(0, 0, 0, 0.28)">Privacy policy</a> </td> </tr>'; $html .= '</table>'; //include 'pljs.php'; $html .= '<input id="signup" name="signup" type="submit" class="cta-btn" value="Sign Up" />'; return $html; }
public function edit_profile() { $clang = $this->getController()->lang; App()->getClientScript()->registerPackage('jqgrid'); $userlist = getPagelist(); $aData['row'] = 0; $aData['usr_arr'] = $userlist; $aData['imageurl'] = Yii::app()->getConfig("adminimageurl"); $action = isset($_POST['action']) ? $_POST['action'] : ''; if ($action == 'edit_profile') { $fname = $_POST['fname']; $lname = $_POST['lname']; $panellist_id = $_POST['panellist_id']; $aData['display'] = false; $aViewUrls = array(); $oRecord = PL::model()->findByPk($panellist_id); $oRecord->first_name = $fname; $oRecord->last_name = $lname; $EditPanellist = $oRecord->save(); if ($EditPanellist) { $quelist_reg = Question(get_question_categoryid('Registration'), '', true, false); $sql = "UPDATE {{panellist_answer}} SET status = 'E' "; foreach ($quelist_reg as $key => $value) { if ($value == 'CheckBox') { $val = implode(',', $_POST[$key]); $sql .= ", question_id_{$key} = '" . $val . "'"; } elseif ($value == 'DOB') { $birthdate = date('Y-m-d', strtotime($_POST[$key])); $sql .= ", question_id_{$key} = '" . $birthdate . "'"; } else { $sql .= ", question_id_{$key} = '" . $_POST[$key] . "'"; } } $quelist_prof = Question(get_question_categoryid('Profile'), '', true, false); foreach ($quelist_prof as $key => $value) { if ($value == 'CheckBox') { $val = implode(',', $_POST[$key]); $sql .= ", question_id_{$key} = '" . $val . "'"; } elseif ($value == 'DOB') { $birthdate = date('Y-m-d', strtotime($_POST[$key])); $sql .= ", question_id_{$key} = '" . $birthdate . "'"; } else { $sql .= ", question_id_{$key} = '" . $_POST[$key] . "'"; } } $sql .= " where panellist_id = '" . $panellist_id . "' "; $result = Yii::app()->db->createCommand($sql)->query(); $message = $clang->gT('Data submitted Successfully'); App()->user->setFlash('Error', $message); $this->getController()->redirect(array('/pl/home/sa/edit_profile')); } } $this->_renderWrappedTemplate('', 'edit_account', $aData); }