font-size: 100%;
}
-div.contact div.appli {
+div.contact div.edu {
}
div.contact div.bits {
}
}
-var applisType;
-var applisTypeAll;
-var applisTypeName;
+var educationDegree;
+var educationDegreeAll;
+var educationDegreeName;
// General
var subgrades;
var names;
-function fillType(selectCtrl, appli, fill)
+function fillType(selectCtrl, edu, fill)
{
var i;
var i0 = 0;
selectCtrl.options[i] = null;
}
- if (fill || appli < 0) {
+ if (fill || edu < 0) {
selectCtrl.options[0] = new Option(' ');
i0 = 1;
}
- if (appli >= 0) {
- for (i = 0; i < applisType[appli].length; i++) {
- selectCtrl.options[i0 + i] = new Option(applisTypeName[applisType[appli][i] - 1], applisType[appli][i]);
+ if (edu >= 0) {
+ for (i = 0; i < educationDegree[edu].length; i++) {
+ selectCtrl.options[i0 + i] = new Option(educationDegreeName[educationDegree[edu][i] - 1], educationDegree[edu][i]);
}
} else if (fill) {
- for (i = 0; i < applisTypeAll.length; i++) {
- selectCtrl.options[i0 + i] = new Option(applisTypeName[applisTypeAll[i] - 1], applisTypeAll[i]);
+ for (i = 0; i < educationDegreeAll.length; i++) {
+ selectCtrl.options[i0 + i] = new Option(educationDegreeName[educationDegreeAll[i] - 1], educationDegreeAll[i]);
}
}
}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-function applis_options($current=0)
+function education_options($current=0)
{
$html = '<option value = "-1"></option>';
$res = XDB::iterator("SELECT *
FROM profile_education_enum
ORDER BY name");
- while ($arr_appli = $res->next()) {
- $html .= '<option value="' . $arr_appli["id"] . '"';
- if ($arr_appli["id"]==$current) {
+ while ($arr_edu = $res->next()) {
+ $html .= '<option value="' . $arr_edu["id"] . '"';
+ if ($arr_edu["id"]==$current) {
$html .= " selected='selected'";
}
- $html .= '>' . htmlspecialchars($arr_appli["name"]) . "</option>\n";
+ $html .= '>' . htmlspecialchars($arr_edu["name"]) . "</option>\n";
}
return $html;
}
-/** pour appeller applis_options depuis smarty
+/** pour appeller education_options depuis smarty
*/
-function _applis_options_smarty($params)
+function _education_options_smarty($params)
{
if(!isset($params['selected'])) {
$params['selected'] = 0;
}
- return applis_options($params['selected']);
+ return education_options($params['selected']);
}
-Platal::page()->register_function('applis_options', '_applis_options_smarty');
+Platal::page()->register_function('education_options', '_education_options_smarty');
-/** affiche un Array javascript contenant les types de chaque appli
+/** affiche un Array javascript contenant les diplômes de chaque formation
*/
-function applis_type()
+function education_degree()
{
$html = "";
$res = XDB::iterRow("SELECT eduid, degreeid
FROM profile_education_degree AS d
INNER JOIN profile_education_enum AS e ON (e.id = d.eduid)
ORDER BY e.name");
- if ($appli_type = $res->next()) {
- $eduid = $appli_type['0'];
+ if ($edu_degree = $res->next()) {
+ $eduid = $edu_degree['0'];
$html .= "[";
- $html .= $appli_type['1'];
- $appli_type = $res->next();
- while ($appli_type['0'] == $eduid) {
- $html .= "," . $appli_type['1'];
- $appli_type = $res->next();
+ $html .= $edu_degree['1'];
+ $edu_degree = $res->next();
+ while ($edu_degree['0'] == $eduid) {
+ $html .= "," . $edu_degree['1'];
+ $edu_degree = $res->next();
}
$html .= "]";
}
- while ($appli_type) {
- $eduid = $appli_type['0'];
+ while ($edu_degree) {
+ $eduid = $edu_degree['0'];
$html .= ",\n[";
- $html .= $appli_type['1'];
- $appli_type = $res->next();
- while ($appli_type['0'] == $eduid) {
- $html .= "," . $appli_type['1'];
- $appli_type = $res->next();
+ $html .= $edu_degree['1'];
+ $edu_degree = $res->next();
+ while ($edu_degree['0'] == $eduid) {
+ $html .= "," . $edu_degree['1'];
+ $edu_degree = $res->next();
}
$html .= "]";
}
return $html;
}
-Platal::page()->register_function('applis_type', 'applis_type');
+Platal::page()->register_function('education_degree', 'education_degree');
-/** affiche tous les types possibles d'applis
+/** affiche tous les types possibles de diplômes
*/
-function applis_type_all()
+function education_degree_all()
{
$html = "";
$res = XDB::query("SELECT id
ORDER BY id");
return implode(',', $res->fetchColumn());
}
-Platal::page()->register_function('applis_type_all', 'applis_type_all');
+Platal::page()->register_function('education_degree_all', 'education_degree_all');
-/** affiche les noms de tous les types possibles d'applis
+/** affiche les noms de tous les diplômes possibles
*/
-function applis_type_name()
+function education_degree_name()
{
$html = "";
$res = XDB::query("SELECT degree
ORDER BY id");
return '\'' . implode('\',\'', $res->fetchColumn()) . '\'';
}
-Platal::page()->register_function('applis_type_name', 'applis_type_name');
+Platal::page()->register_function('education_degree_name', 'education_degree_name');
-/** formatte une ecole d'appli pour l'affichage
+/** formatte une formation pour l'affichage
*/
-function applis_fmt($name, $url, $degree, $grad_year, $field, $sexe, $long)
+function education_fmt($name, $url, $degree, $grad_year, $field, $sexe, $long)
{
$field = strtolower($field);
$txt = "";
return $txt;
}
-function _applis_fmt($params, &$smarty)
+function _education_fmt($params, &$smarty)
{
extract($params);
- return applis_fmt($name, $url, $degree, $grad_year, $field, $sexe, $long);
+ return education_fmt($name, $url, $degree, $grad_year, $field, $sexe, $long);
}
-Platal::page()->register_function('applis_fmt', '_applis_fmt');
+Platal::page()->register_function('education_fmt', '_education_fmt');
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
?>
ORDER BY ed.grad_year", $uid);
$user['education'] = "";
- require_once('applis.func.inc.php');
+ require_once('education.func.inc.php');
if (list($name, $url, $degree, $grad_year, $field) = $res->next()) {
- $user['education'] .= applis_fmt($name, $url, $degree, $grad_year, $field, $user['sexe'], true);
+ $user['education'] .= education_fmt($name, $url, $degree, $grad_year, $field, $user['sexe'], true);
}
while (list($name, $url, $degree, $grad_year, $field) = $res->next()) {
- $user['education'] .= ", " . applis_fmt($name, $url, $degree, $grad_year, $field, $user['sexe'], true);
+ $user['education'] .= ", " . education_fmt($name, $url, $degree, $grad_year, $field, $user['sexe'], true);
}
if (has_user_right($user['medals_pub'], $view)) {
}
}
- // applis
+ // education
// medals
}
// }}}
{
public function __construct(PlSet &$set, $data, array $params)
{
- require_once 'applis.func.inc.php';
+ require_once 'education.func.inc.php';
global $globals;
$this->entriesPerPage = $globals->search->per_page;
if (@$params['with_score']) {
'profile/ajax/secteur' => $this->make_hook('ajax_secteur', AUTH_COOKIE, 'user', NO_AUTH),
'profile/ajax/skill' => $this->make_hook('ajax_skill', AUTH_COOKIE, 'user', NO_AUTH),
'profile/ajax/searchname' => $this->make_hook('ajax_searchname', AUTH_COOKIE, 'user', NO_AUTH),
- 'javascript/applis.js' => $this->make_hook('applis_js', AUTH_COOKIE),
+ 'javascript/education.js' => $this->make_hook('education_js', AUTH_COOKIE),
'javascript/grades.js' => $this->make_hook('grades_js', AUTH_COOKIE),
'profile/medal' => $this->make_hook('medal', AUTH_PUBLIC),
'profile/orange' => $this->make_hook('p_orange', AUTH_MDP),
// Build the page
$page->addJsLink('ajax.js');
- $page->addJsLink('applis.js');
+ $page->addJsLink('education.js');
$page->addJsLink('grades.js');
$page->addJsLink('profile.js');
$page->addJsLink('jquery.autocomplete.js');
$page->setTitle('Mon Profil');
}
- function handler_applis_js(&$page)
+ function handler_education_js(&$page)
{
header('Content-Type: text/javascript; charset=utf-8');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
- $page->changeTpl('profile/applis.js.tpl', NO_SKIN);
- require_once "applis.func.inc.php";
+ $page->changeTpl('profile/education.js.tpl', NO_SKIN);
+ require_once "education.func.inc.php";
}
function handler_grades_js(&$page)
ORDER BY field");
$page->assign('edu_fields', $res->fetchAllAssoc());
$page->assign('eduid', $eduid);
- require_once "applis.func.inc.php";
+ require_once "education.func.inc.php";
}
function handler_ajax_medal(&$page, $id)
public function _prepare(PlPage &$page, $id)
{
- require_once "applis.func.inc.php";
+ require_once "education.func.inc.php";
$res = XDB::iterator("SELECT id, field
FROM profile_education_field_enum
{if !$c.dcd && ($c.inscrit || $smarty.session.auth eq AUTH_PUBLIC)}</a>{/if}
</div>
- <div class="appli">
+ <div class="edu">
{if $c.iso3166_1}
<img src='images/flags/{$c.iso3166_1}.gif' alt='{$c.nat1}' height='11' title='{$c.nat1}' />
{/if}
{if $c.iso3166_3}
<img src='images/flags/{$c.iso3166_3}.gif' alt='{$c.nat3}' height='11' title='{$c.nat3}' />
{/if}
- X {$c.promo}{if $c.eduname0}, {applis_fmt name=$c.eduname0 url=$c.eduurl0 degree=$c.edudegree0
+ X {$c.promo}{if $c.eduname0}, {education_fmt name=$c.eduname0 url=$c.eduurl0 degree=$c.edudegree0
grad_year=$c.edugrad_year0 field=$c.edufield0 sexe=$c.sexe}{*
- *}{/if}{if $c.eduname1}, {applis_fmt name=$c.eduname1 url=$c.eduurl1 degree=$c.edudegree1
+ *}{/if}{if $c.eduname1}, {education_fmt name=$c.eduname1 url=$c.eduurl1 degree=$c.edudegree1
grad_year=$c.edugrad_year1 field=$c.edufield1 sexe=$c.sexe}{*
- *}{/if}{if $c.eduname2}, {applis_fmt name=$c.eduname2 url=$c.eduurl2 degree=$c.edudegree2
+ *}{/if}{if $c.eduname2}, {education_fmt name=$c.eduname2 url=$c.eduurl2 degree=$c.edudegree2
grad_year=$c.edugrad_year2 field=$c.edufield2 sexe=$c.sexe}{*
- *}{/if}{if $c.eduname3}, {applis_fmt name=$c.eduname3 url=$c.eduurl3 degree=$c.edudegree3
+ *}{/if}{if $c.eduname3}, {education_fmt name=$c.eduname3 url=$c.eduurl3 degree=$c.edudegree3
grad_year=$c.edugrad_year3 field=$c.edufield3 sexe=$c.sexe}{*
*}{/if}{if $c.dcd}, décédé{if $c.sexe}e{/if} le {$c.deces|date_format}{/if}
</div>
<div class="nom">
<span {if $p.name_tooltip}class="hinted" title="{$p.name_tooltip}"{/if}>{$p.name_display}</span>
</div>
- <div class="appli">
+ <div class="edu">
X{$p.promo}
</div>
<div class="bits" style="width: 40%;">
{assign var=eduname value="edus[`$eduid`]"}
<select name="{$eduname}[eduid]" onchange="fillType(this.form['{$eduname}[degreeid]'], this.selectedIndex-1);">
- {applis_options selected=$edu.eduid}
+ {education_options selected=$edu.eduid}
</select>
<input type="hidden" name="edu_{$eduid}_tmp" value="{$edu.degreeid}" />
<select name="{$eduname}[degreeid]">
{* *}
{**************************************************************************}
-applisType = new Array({applis_type});
-applisTypeAll = new Array({applis_type_all});
-applisTypeName = new Array({applis_type_name});
+educationDegree = new Array({education_degree});
+educationDegreeAll = new Array({education_degree_all});
+educationDegreeName = new Array({education_degree_name});
{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}