$db_object->insert($mysql); } //DETERMINE THE FAMILY OF THE SELECTED POSITION... $mysql = "select family_id from {$family_position} where position_id = '{$posid}'"; $familypos_arr = $db_object->get_a_line($mysql); $familyofpos = $familypos_arr['family_id']; //THE POSITION IS OBTAINED FROM THE PREVIOUS SCREEN //SHOW THE MODELS RELATING TO THAT POSITION... //SELECT THE MODELS THAT THIS PERSON IS CAPABLE OF VIEWING... //SELECT THE MODELS RELATING TO THAT POSITIONS' FAMILY... $userviewablemodels = $common->viewable_models($db_object, $user_id); $modelid_all = @implode("','", $userviewablemodels); if ($modelid_all != '') { $mysql = "select model_id \n\t\t\t\tfrom {$model_factors_1} \n\t\t\t\twhere family = '{$familyofpos}'\n\t\t\t\tand model_id in ('{$modelid_all}')"; $models_arr = $db_object->get_single_column($mysql); $models_full = @implode("','", $models_arr); } if ($models_full != '') { $mysql = "select model_id,model_name from {$model_name_table} where model_id in ('{$models_full}')"; $models_display_arr = $db_object->get_rsltset($mysql); } $multipleloopvalues['modelsview_loop'] = $models_display_arr; $values['posid'] = $posid; $returncontent = $common->direct_replace($db_object, $returncontent, $values); $returncontent = $common->multipleloop_replace($db_object, $returncontent, $multipleloopvalues, ''); echo $returncontent; } } $obj = new displaymodels(); $obj->show_models($db_object, $common, $post_var, $default, $user_id); include_once 'footer.php';
$multipleloopvalues['highperformerskills1tech_loop'] = $modelskillstech_arr; $multipleloopvalues['highperformerskills2_loop'] = $modelskills_arr; $multipleloopvalues['highperformerskills2tech_loop'] = $modelskillstech_arr; $returncontent = $common->multipleloop_replace($db_object, $returncontent, $multipleloopvalues, ''); $returncontent = $common->direct_replace($db_object, $returncontent, $values); $path = $common->path; $file = $path . "career/succession_plan/succession_plan_{$user_id}.txt"; $fp = fopen($file, "w"); fwrite($fp, $returncontent); fclose($fp); if (file_exists($file)) { $len = filesize($file); $filename = "succession_plan_{$user_id}.txt"; header("content-type: application/stream"); header("content-length: {$len}"); header("content-disposition: attachment; filename={$filename}"); $fp = fopen($file, "r"); fpassthru($fp); exit; } else { $str = <<<EOD \t\t<script> \t\t\talert( '{$err['cEmptyrecords']}' ); \t\t\twindow.location=document.referrer; \t\t</script> EOD; } } } $obj = new displaymodels(); $obj->show_documentactions($db_object, $common, $default, $user_id, $error_msg, $model_id);
} else { $values[notselected3] = ""; } //IF AN EXTERNAL HIRE WAS SELECTED .... //approved_devbuilder is the table where the skills in the learning plan can be taken... //HIGH PERFORMERS SKILLS DISPLAYED FOR EXTERNAL CANDIDATES (SAME SCRIPT USED TO DISPLAY //BOTH FIRST DESIGNEE AND SECOND DESIGNEE)... $mysql = "select {$model_skills}.skill_id,skill_name from {$skills},{$model_skills}\n\t\t\twhere {$skills}.skill_id = {$model_skills}.skill_id\n\t\t\tand model_id = '{$modelid}' and skill_type = 'i'"; $modelskills_arr = $db_object->get_rsltset($mysql); $mysql = "select {$model_skills}.skill_id,skill_name from {$skills},{$model_skills}\n\t\t\twhere {$skills}.skill_id = {$model_skills}.skill_id\n\t\t\tand model_id = '{$modelid}' and skill_type = 't'"; $modelskillstech_arr = $db_object->get_rsltset($mysql); $multipleloopvalues['highperformerskills1_loop'] = $modelskills_arr; $multipleloopvalues['highperformerskills1tech_loop'] = $modelskillstech_arr; $multipleloopvalues['highperformerskills2_loop'] = $modelskills_arr; $multipleloopvalues['highperformerskills2tech_loop'] = $modelskillstech_arr; $returncontent = $common->multipleloop_replace($db_object, $returncontent, $multipleloopvalues, ''); $values[model] = $modelid; $returncontent = $common->direct_replace($db_object, $returncontent, $values); echo $returncontent; } } $obj = new displaymodels(); switch ($action) { case NULL: $obj->show_models($db_object, $common, $post_var, $default, $user_id); break; case "show": $obj->show_documentactions($db_object, $common, $default, $user_id, $error_msg, $post_var, $model_to_view); break; } include_once 'footer.php';