- Timestamp:
- 08/22/08 21:07:22 (3 months ago)
- Location:
- websites/pbidir.com/bibivu
- Files:
-
- 2 added
- 11 modified
-
bin/admin.php (modified) (3 diffs)
-
bin/start.php (modified) (4 diffs)
-
etc/lang/de/home.lang.php (modified) (1 diff)
-
etc/lang/fr/home.lang.php (modified) (1 diff)
-
lib/category.php (modified) (2 diffs)
-
lib/category_translation.php (added)
-
lib/pbi.php (modified) (2 diffs)
-
lib/pbi_translation.php (added)
-
lib/user.php (modified) (2 diffs)
-
slib/lang.php (modified) (1 diff)
-
tpl/pbidir/admin/list.php (modified) (1 diff)
-
tpl/pbidir/home.php (modified) (1 diff)
-
tpl/pbidir/pbi.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
websites/pbidir.com/bibivu/bin/admin.php
r1731 r2647 249 249 $limit = ''; 250 250 $array_add_uri = array('add'=>'', 'ajax'=>''); 251 if((isset($_POST) && is_array($_POST) && !empty($_POST)) || $this->uri->get('order','')!=''){ 251 if( 252 (isset($_POST) && is_array($_POST) && !empty($_POST)) || 253 $this->uri->get('order','')!='' || 254 (isset($_GET) && is_array($_GET) && !empty($_GET))){ 252 255 $fields = $this->$what->get_fields(); 253 256 $str = '^('.implode('|', array_keys($fields)).')( (ASC|DESC))?$'; 254 foreach($_POST as $key=>$value){ 257 $tmps = array_merge(is_array($_GET)?$_GET:array(), is_array($_POST)?$_POST:array()); 258 foreach($tmps as $key=>$value){ 255 259 if(eregi($str,$key)){ 256 260 $where[] = array('field'=>$key, 'operator'=>'=', 'value'=>$value); … … 347 351 public function web_mirror(){ $this->_manage('mirror'); } 348 352 public function web_category(){ $this->_manage('category'); } 353 public function web_category_translation(){ $this->_manage('category_translation'); } 349 354 public function web_pcbsd_version(){ $this->_manage('pcbsd_version'); } 350 355 public function web_permission_item(){ $this->_manage('permission_item'); } … … 377 382 $this->_manage('pbi_image',$owner); 378 383 } 384 public function web_pbi_translation(){ 385 $owner = array('from_field'=>'pbi_id', 386 'table'=>'pbi', 387 'field'=>'user_id', 388 'field_id'=>'id', 389 ); 390 $this->_manage('pbi_translation',$owner); 391 } 379 392 public function web_pbi_status(){ 380 393 $owner = array('from_field'=>'pbi_id', -
websites/pbidir.com/bibivu/bin/start.php
r2449 r2647 114 114 $order = array('name'); 115 115 $limit = ''; 116 $this->display->assign('categories', $this->table_prototype->get_raw($filters, $order, $group, $limit,'category'));116 $this->display->assign('categories', load_library('category')->get_all($filters, $order, $group, $limit,'category')); 117 117 118 118 $filters = array(); … … 142 142 $this->display->assign('most_download', $this->pbi->get_raw($filters, $order, $group, $limit)); 143 143 144 $this->display->assign('can_write',$this->permissions->can('category', 'write')); 145 $this->display->assign('can_translate',$this->permissions->can('category_translation', 'write')); 146 144 147 $this->display->assign('title', 'Your PC-BSD software'); 145 148 $this->display('home'); … … 160 163 $filters = array(); 161 164 $filters[] = array('field'=>'web_alias', 'operator'=>'=', 'value'=>$this->uri->get_num(3)); 162 $category = $this->table_prototype->get_record($filters,'category')->get_info();165 $category = load_library('category')->get_record($filters)->get_info(); 163 166 if(!isset($category['id']) || $category['web_alias']!=$this->uri->get_num(3)){ 164 167 //package doesn't exists … … 337 340 $this->display->assign('can_comment_delete',false); 338 341 } 342 $this->display->assign('can_translate',$this->permissions->can('pbi_translation', 'write')); 339 343 340 344 $owner = array('id'=>$pbi['id'], -
websites/pbidir.com/bibivu/etc/lang/de/home.lang.php
r2602 r2647 2 2 //home page strings 3 3 $lang['pbi_directory'] = 'pbi Verzeichnis'; 4 $lang['welcome'] = 'Willkommen im pbi Verzeichnis! Hier können Sie unsere Software-archive Durchsuchen, um Software für Ihr <a href="http://www.pcbsd.org/">PC-BSD Betriebsystem</a> zu finden. Eine der besten Eigenschaften des PBI-Systems ist, dass Sie Software mit einem Klick installieren können ohne auf irgendwelche Abhängigkeiten achten zu mössen. Auf der offiziellen Webseite von <a href="http://www.pcbsd.org/">PC-BSD</a> können Sie mehr über die <a href="http://www.pcbsd.org/content/view/20/26/">PBI-Technologie</a> erfahren. Das PBI Verzeichnis hat in keinster Weise etwas mit der PC-BSD Software LLC zu tun.';4 $lang['welcome'] = 'Willkommen im PBI-Verzeichnis! Hier können Sie unsere Software-Archive durchsuchen, um Software für Ihr <a href="http://www.pcbsd.org/">Betriebsystem PC-BSD</a> zu finden. Eine der besten Eigenschaften des PBI-Systems ist, dass Sie Software mit einem Klick installieren können ohne auf irgendwelche Abhängigkeiten achten zu mössen. Auf der offiziellen Webseite von <a href="http://www.pcbsd.org/">PC-BSD</a> können Sie mehr über die <a href="http://www.pcbsd.org/content/view/20/26/">PBI-Technologie</a> erfahren. Das PBI Verzeichnis hat in keinster Weise etwas mit der PC-BSD Software LLC zu tun.'; 5 5 $lang['latest_releases'] = 'Neuste Versionen'; 6 6 $lang['latest_software'] = 'Neuste Software'; -
websites/pbidir.com/bibivu/etc/lang/fr/home.lang.php
r1676 r2647 2 2 //home page strings 3 3 $lang['pbi_directory'] = 'Répertoire pbi'; 4 $lang['welcome'] = 'Bienvenue dans le répertoire pbi! Parcourez notre site pour télécharger librement des logiciels pour votre <a href="http://www.pcbsd. org/">Système d\'exploitation PC-BSD </a>. Parmi les avantages du système de pbi: une utilisation simple. Tous vos logiciels s\'installent en quelques clics et surtout, plus de problèmes de dépendances, le système de pbi les gère tout seul. Plus d\'informations sur <a href="http://www.pcbsd.org/content/view/20/26/">la technologie pbi</a> sur le <a href="http://www.pcbsd.org/">site web officiel PC-BSD</a>. Le répertoire pbi n\'est en aucune façon associé avec PC-BSD Software LLC.';4 $lang['welcome'] = 'Bienvenue dans le répertoire pbi! Parcourez notre site pour télécharger librement des logiciels pour votre <a href="http://www.pcbsd.fr/">Système d\'exploitation PC-BSD </a>. Parmi les avantages du système de pbi: une utilisation simple. Tous vos logiciels s\'installent en quelques clics et surtout, plus de problèmes de dépendances, le système de pbi les gère tout seul. Plus d\'informations sur <a href="http://www.pcbsd.fr/content/view/20/26/">la technologie pbi</a> sur le <a href="http://www.pcbsd.fr/">site web officiel PC-BSD</a>. Le répertoire pbi n\'est en aucune façon associé avec PC-BSD Software LLC.'; 5 5 $lang['latest_releases'] = 'Dernières versions'; 6 6 $lang['latest_software'] = 'Derniers logiciels'; -
websites/pbidir.com/bibivu/lib/category.php
r1504 r2647 12 12 if($this->related==array()){ 13 13 $related = array(); 14 $related[] = array( 'table' => 'category_translation', 15 'field' => 'category_id', 16 'main_field' => 'id', 17 'show' => 'list', //field, list 18 'name' => 'Translations', 19 'autoopen' => false, 20 'relation_table'=> array(), 21 ); 22 14 23 $related[] = array( 'table' => 'pbi', 15 24 'field' => 'category_id', … … 117 126 } 118 127 128 public function get_info(){ 129 $return = parent::get_info(); 130 if(isset($return['id'])){ //do this only once 131 $filters = array(); 132 $filters[] = array('field'=>'category_id', 'operator'=>'=', 'value'=>$return['id']); 133 $filters[] = array('field'=>'lang', 'operator'=>'=', 'value'=>load_library('lang')->get_lang()); 134 $filters[] = array('field'=>'active', 'operator'=>'=', 'value'=>'y'); 135 $category_translation = load_library('category_translation')->get_record($filters)->get_info(); 136 if(isset($category_translation['lang']) && $category_translation['lang']==load_library('lang')->get_lang()){ 137 $return['name'] = $category_translation['name']; 138 $return['description'] = $category_translation['description']; 139 } 140 $this->current = $return; 141 } 142 return $return; 143 } 144 119 145 public function get_all($where=array(), $orders=array(), $group=array(), $limit='', $from='', $join = array(), $xtrfields = array()){ 120 146 $fields = $this->get_fields(); -
websites/pbidir.com/bibivu/lib/pbi.php
r2136 r2647 32 32 ); 33 33 */ 34 $related[] = array( 'table' => 'pbi_translation', 35 'field' => 'pbi_id', 36 'main_field' => 'id', 37 'show' => 'list', //field, list 38 'name' => 'Translations', 39 'autoopen' => false, 40 'relation_table'=> array(), 41 ); 42 34 43 $related[] = array( 'table' => 'pbi_release', 35 44 'field' => 'pbi_id', … … 428 437 $return['contributor_email'] = ''; 429 438 } 439 $filters = array(); 440 $filters[] = array('field'=>'pbi_id', 'operator'=>'=', 'value'=>$return['id']); 441 $filters[] = array('field'=>'lang', 'operator'=>'=', 'value'=>load_library('lang')->get_lang()); 442 $filters[] = array('field'=>'active', 'operator'=>'=', 'value'=>'y'); 443 $pbi_translation = load_library('pbi_translation')->get_record($filters)->get_info(); 444 if(isset($pbi_translation['lang']) && $pbi_translation['lang']==load_library('lang')->get_lang()){ 445 $return['summary'] = $pbi_translation['summary']; 446 $return['description'] = $pbi_translation['description']; 447 } 430 448 $this->current = $return; 431 449 } -
websites/pbidir.com/bibivu/lib/user.php
r2433 r2647 129 129 'image' => false, 130 130 ); 131 $tmps = load_library('lang')->get_supported_langs(); 132 $values = array(); 133 foreach($tmps as $tmp){ 134 $values[] = $tmp.','.load_library('lang')->get('lang_name','',$tmp); 135 } 131 136 $fields['lang'] = array( 'show' => array('view','field'), 132 137 'view_link' => false, … … 134 139 'type' => 'enum', 135 140 'length'=> NULL, 136 'values'=> 'de,Deutsch'. 137 '|en,English'. 138 '|es,Spanish'. 139 '|fr,French'. 140 '|it,Italian'. 141 '|ja,Japanese'. 142 '|nl,Nederlands'. 143 '|ru,Russian'. 144 '|tr,Turkish'. 145 '', 141 'values'=> implode('|',$values), 146 142 'text' => 'Language', 147 143 'required' => NULL, -
websites/pbidir.com/bibivu/slib/lang.php
r2324 r2647 28 28 } 29 29 return $this->config['detected']; 30 } 31 32 public function get_supported_langs(){ 33 return $this->config['supported']; 30 34 } 31 35 -
websites/pbidir.com/bibivu/tpl/pbidir/admin/list.php
r1508 r2647 1 1 <?php 2 $_POST['_srt_field_to'] = isset($_POST['_srt_field_to'])?$_POST['_srt_field_to']:''; 3 $_POST['_srt_field_from'] = isset($_POST['_srt_field_from'])?$_POST['_srt_field_from']:''; 4 $_POST['_srt_div'] = isset($_POST['_srt_div'])?$_POST['_srt_div']:''; 2 5 if(!$ajax){ 3 6 ?><ul class="breadcrumbs"> -
websites/pbidir.com/bibivu/tpl/pbidir/home.php
r1382 r2647 15 15 ?><li><img alt="<?=$category['name']?>" src="<?=$category['icon']?>" /> 16 16 <div class="categ"> 17 <div class="categname"><a href="<?=$category_uri?>/<?=$category['web_alias']?>"><?=$category['name']?></a></div> 17 <div class="categname"><a href="<?=$category_uri?>/<?=$category['web_alias']?>"><?=$category['name']?></a><?php 18 if($can_write){ 19 ?><a href="<?=load_class('uri')->create_uri(array(CLASS_KEY=>'admin', TASK_KEY=>'category','view'=>'','ajax'=>'', 'id'=>$category['id']))?>" class="divBox"><input type="button" value=" Edit This Category " class="button edit divBox" /></a><?php 20 } 21 if($can_translate){ 22 ?><a href="<?=load_class('uri')->create_uri(array(CLASS_KEY=>'admin', TASK_KEY=>'category_translation','list'=>'','ajax'=>'', 'category_id'=>$category['id']))?>" class="divBox"><input type="button" value=" Translate This Category " class="button edit divBox" /></a><?php 23 } 24 ?></div> 18 25 <div class="categdescr"><?=$category['description']?></div> 19 26 </div> -
websites/pbidir.com/bibivu/tpl/pbidir/pbi.php
r1770 r2647 83 83 if($can_write){ 84 84 ?><a href="<?=load_class('uri')->create_uri(array(CLASS_KEY=>'admin', TASK_KEY=>'pbi','view'=>'','ajax'=>'', 'id'=>$pbi['id']))?>" class="divBox"><input type="button" value=" Edit This PBI " class="button edit divBox" /></a><?php 85 } ?></div> 85 } 86 if($can_translate){ 87 ?><a href="<?=load_class('uri')->create_uri(array(CLASS_KEY=>'admin', TASK_KEY=>'pbi_translation','list'=>'','ajax'=>'', 'pbi_id'=>$pbi['id']))?>" class="divBox"><input type="button" value=" Translate This PBI " class="button edit divBox" /></a><?php 88 } 89 ?></div> 86 90 <?php 87 91 if($pbi['use_wine']=='y'){
