X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fprofile.php;h=e3d86cddc3b8c555832efc08fab26f28d11061e0;hb=b235d980e6d9b3e1e815da91465b2a6a32f46191;hp=f21e463c9fbf68cf715f7493f6a9b40ceb3eae67;hpb=15beefb32f085b545152e9c2489680edfa9b8f13;p=platal.git diff --git a/modules/profile.php b/modules/profile.php index f21e463..e3d86cd 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -35,6 +35,7 @@ class ProfileModule extends PLModule 'profile/ajax/address' => $this->make_hook('ajax_address', AUTH_COOKIE, 'user', NO_AUTH), 'profile/ajax/tel' => $this->make_hook('ajax_tel', AUTH_COOKIE, 'user', NO_AUTH), 'profile/ajax/medal' => $this->make_hook('ajax_medal', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/networking' => $this->make_hook('networking', AUTH_PUBLIC), 'profile/ajax/job' => $this->make_hook('ajax_job', AUTH_COOKIE, 'user', NO_AUTH), '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), @@ -125,6 +126,19 @@ class ProfileModule extends PLModule exit; } + function handler_networking(&$page, $mid) + { + $res = XDB::query("SELECT icon + FROM profile_networking_enum + WHERE network_type = {?}", + $mid); + $img = dirname(__FILE__) . '/../htdocs/images/networking/' . $res->fetchOneCell(); + $type = mime_content_type($img); + header("Content-Type: $type"); + echo file_get_contents($img); + exit; + } + function handler_photo_change(&$page) { $page->changeTpl('profile/trombino.tpl'); @@ -811,7 +825,8 @@ class ProfileModule extends PLModule $table_editor = new PLTableEditor('admin/networking', 'profile_networking_enum', 'network_type'); $table_editor->describe('name', 'intitulé', true); $table_editor->describe('icon', 'nom de l\'icône', false); - $table_editor->describe('filter', 'nom du filtre à appliquer', true); + $table_editor->describe('filter', 'filtre', true); + $table_editor->describe('link', 'lien web', true); $table_editor->apply($page, $action, $id); } function handler_admin_medals(&$page, $action = 'list', $id = null) {