Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inputs size #214

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
8937389
Nettoyage git
Mar 14, 2016
e6caa0f
Nettoyage
Mar 14, 2016
971414e
Réinitialisation config.php
Mar 15, 2016
c971056
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 18, 2016
728c944
Chgt config.php
Mar 18, 2016
62934c5
Désindexation config.php
Mar 27, 2016
dbdd9bf
Modif PlxShow::staticUrl
Mar 27, 2016
b384331
Merge remote-tracking branch 'upstream/master'
Feb 4, 2017
b4ca86d
Merge branch 'master' of https://github.com/pluxml/PluXml
Feb 6, 2017
c503f33
Merge branch 'master' of https://github.com/pluxml/PluXml
Feb 8, 2017
496574c
Merge branch 'master' of https://github.com/pluxml/PluXml
Feb 9, 2017
81880cc
Merge branch 'master' of https://github.com/pluxml/PluXml
Feb 12, 2017
f0ee538
Merge branch 'master' of https://github.com/pluxml/PluXml
Feb 13, 2017
863e4f6
Merge branch 'master' of https://github.com/pluxml/PluXml
Feb 17, 2017
9b890ee
Merge branch 'master' of https://github.com/pluxml/PluXml
Feb 19, 2017
888335c
Merge branch 'master' of https://github.com/pluxml/PluXml
Feb 20, 2017
09a987f
Merge branch 'master' of https://github.com/pluxml/PluXml
Feb 24, 2017
75a2f05
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 1, 2017
e32a075
ajout fichiers
Mar 1, 2017
4badd65
dragdrop
Mar 1, 2017
c1c8655
drag & drop medias
Mar 1, 2017
bb45968
drap & drop: gestion erreur upload fichiers
Mar 1, 2017
3a22be4
err propriété css hover
Mar 1, 2017
7e03d9e
ajout hook plxMotorRedir301 + fct redir301
Mar 3, 2017
1b89929
maj changelog
Mar 3, 2017
8e25c2b
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 3, 2017
c3ce0b9
Merge branch 'dragdrop' of https://github.com/pluxml/PluXml
Mar 7, 2017
0c34105
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 7, 2017
de0f025
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 8, 2017
d57c162
dim. et tailles miniatures meme cols que images
Mar 8, 2017
47ce70f
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 9, 2017
0d46920
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 10, 2017
e52625a
Synchro core/admin/medias.php avec site PluXml
Mar 10, 2017
98573d0
Merge branch 'thumb_size'
Mar 13, 2017
6ecfebe
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 14, 2017
d495d39
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 14, 2017
fbc2e57
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 15, 2017
4448985
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 16, 2017
22afa21
Ajout colonne email dans tableau utilisateurs
Mar 17, 2017
f873e59
synchro core/admin/themes/admin.css avec upstream
Mar 19, 2017
24c0339
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 21, 2017
056e160
Merge branch 'master' into email_users
Mar 21, 2017
a307b23
bugfix dans core/lib/class.plx.admin.php (email)
Mar 21, 2017
1017665
Merge branch 'master' of https://github.com/pluxml/PluXml
Mar 22, 2017
aed79b7
Gestion de <input size="xxx" dans les tableaux
Mar 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
define('PLX_CONFIG_PATH', 'data/configuration/');
?>
<?php
define('PLX_CONFIG_PATH', 'echecs/configuration/');
?>
16 changes: 8 additions & 8 deletions core/admin/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@
echo '<tr>';
echo '<td><input type="checkbox" name="idCategory[]" value="'.$k.'" /><input type="hidden" name="catNum[]" value="'.$k.'" /></td>';
echo '<td>'.$k.'</td><td>';
plxUtils::printInput($k.'_name', plxUtils::strCheck($v['name']), 'text', '10-50');
plxUtils::printInput($k.'_name', plxUtils::strCheck($v['name']), 'text', '-50');
echo '</td><td>';
plxUtils::printInput($k.'_url', $v['url'], 'text', '10-50');
plxUtils::printInput($k.'_url', $v['url'], 'text', '-50');
echo '</td><td>';
plxUtils::printSelect($k.'_active', array('1'=>L_YES,'0'=>L_NO), $v['active']);
echo '</td><td>';
plxUtils::printSelect($k.'_tri', $aTri, $v['tri']);
echo '</td><td>';
plxUtils::printInput($k.'_bypage', $v['bypage'], 'text', '1-3');
plxUtils::printInput($k.'_bypage', $v['bypage'], 'text', '-3');
echo '</td><td>';
plxUtils::printInput($k.'_ordre', $ordre, 'text', '1-3');
plxUtils::printInput($k.'_ordre', $ordre, 'text', '-3');
echo '</td><td>';
plxUtils::printSelect($k.'_menu', array('oui'=>L_DISPLAY,'non'=>L_HIDE), $v['menu']);
echo '</td>';
Expand All @@ -104,17 +104,17 @@
<?php
echo '<input type="hidden" name="catNum[]" value="'.$new_catid.'" />';
plxUtils::printInput($new_catid.'_template', 'categorie.php', 'hidden');
plxUtils::printInput($new_catid.'_name', '', 'text', '10-50');
plxUtils::printInput($new_catid.'_name', '', 'text', '-50');
echo '</td><td>';
plxUtils::printInput($new_catid.'_url', '', 'text', '10-50');
plxUtils::printInput($new_catid.'_url', '', 'text', '-50');
echo '</td><td>';
plxUtils::printSelect($new_catid.'_active', array('1'=>L_YES,'0'=>L_NO), '1');
echo '</td><td>';
plxUtils::printSelect($new_catid.'_tri', $aTri, $plxAdmin->aConf['tri']);
echo '</td><td>';
plxUtils::printInput($new_catid.'_bypage', $plxAdmin->aConf['bypage'], 'text', '1-3');
plxUtils::printInput($new_catid.'_bypage', $plxAdmin->aConf['bypage'], 'text', '-3');
echo '</td><td>';
plxUtils::printInput($new_catid.'_ordre', ++$num, 'text', '1-3');
plxUtils::printInput($new_catid.'_ordre', ++$num, 'text', '-3');
echo '</td><td>';
plxUtils::printSelect($new_catid.'_menu', array('oui'=>L_DISPLAY,'non'=>L_HIDE), '1');
echo '</td><td>&nbsp;';
Expand Down
18 changes: 9 additions & 9 deletions core/admin/parametres_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@
echo '<tr>';
echo '<td><input type="checkbox" name="idUser[]" value="'.$_userid.'" /><input type="hidden" name="userNum[]" value="'.$_userid.'" /></td>';
echo '<td>'.$_userid.'</td><td>';
plxUtils::printInput($_userid.'_name', plxUtils::strCheck($_user['name']), 'text', '12-255');
plxUtils::printInput($_userid.'_name', plxUtils::strCheck($_user['name']), 'text', '');
echo '</td><td>';
plxUtils::printInput($_userid.'_login', plxUtils::strCheck($_user['login']), 'text', '12-255');
plxUtils::printInput($_userid.'_login', plxUtils::strCheck($_user['login']), 'text', '');
echo '</td><td>';
plxUtils::printInput($_userid.'_password', '', 'password', '10-255', false, '', '', 'onkeyup="pwdStrength(this.id)"');
plxUtils::printInput($_userid.'_password', '', 'password', '', false, '', '', 'onkeyup="pwdStrength(this.id)"');
echo '</td><td>';
plxUtils::printInput($_userid.'_email', plxUtils::strCheck($_user['email']), 'email', '20-255');
plxUtils::printInput($_userid.'_email', plxUtils::strCheck($_user['email']), 'email', '');
echo '</td><td>';
if($_userid=='001') {
plxUtils::printInput($_userid.'_profil', $_user['profil'], 'hidden');
Expand Down Expand Up @@ -111,14 +111,14 @@
<?php
echo '<input type="hidden" name="userNum[]" value="'.$new_userid.'" />';
plxUtils::printInput($new_userid.'_newuser', 'true', 'hidden');
plxUtils::printInput($new_userid.'_name', '', 'text', '12-255');
plxUtils::printInput($new_userid.'_name', '', 'text', '');
plxUtils::printInput($new_userid.'_infos', '', 'hidden');
echo '</td><td>';
plxUtils::printInput($new_userid.'_login', '', 'text', '12-255');
plxUtils::printInput($new_userid.'_login', '', 'text', '');
echo '</td><td>';
plxUtils::printInput($new_userid.'_password', '', 'password', '10-255', false, '', '', 'onkeyup="pwdStrength(this.id)"');
plxUtils::printInput($new_userid.'_password', '', 'password', '', false, '', '', 'onkeyup="pwdStrength(this.id)"');
echo '</td><td>';
plxUtils::printInput($new_userid.'_email', '', 'email', '20-255');
plxUtils::printInput($new_userid.'_email', '', 'email', '');
echo '</td><td>';
plxUtils::printSelect($new_userid.'_profil', $aProfils, PROFIL_WRITER);
echo '</td><td>';
Expand All @@ -138,4 +138,4 @@
eval($plxAdmin->plxPlugins->callHook('AdminUsersFoot'));
# On inclut le footer
include(dirname(__FILE__).'/foot.php');
?>
?>
16 changes: 8 additions & 8 deletions core/admin/statiques.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ function checkBox(cb) {
$selected = $plxAdmin->aConf['homestatic']==$k ? ' checked="checked"' : '';
echo '<input title="'.L_STATICS_PAGE_HOME.'" type="checkbox" name="homeStatic[]" value="'.$k.'"'.$selected.' onclick="checkBox(\''.$num.'\')" />';
echo '</td><td>';
plxUtils::printInput($k.'_group', plxUtils::strCheck($v['group']), 'text', '10-100');
plxUtils::printInput($k.'_group', plxUtils::strCheck($v['group']), 'text', '-100');
echo '</td><td>';
plxUtils::printInput($k.'_name', plxUtils::strCheck($v['name']), 'text', '10-255');
plxUtils::printInput($k.'_name', plxUtils::strCheck($v['name']), 'text', '-255');
echo '</td><td>';
plxUtils::printInput($k.'_url', $v['url'], 'text', '10-255');
plxUtils::printInput($k.'_url', $v['url'], 'text', '-255');
echo '</td><td>';
plxUtils::printSelect($k.'_active', array('1'=>L_YES,'0'=>L_NO), $v['active']);
echo '</td><td>';
plxUtils::printInput($k.'_ordre', $ordre, 'text', '1-3');
plxUtils::printInput($k.'_ordre', $ordre, 'text', '2-3');
echo '</td><td>';
plxUtils::printSelect($k.'_menu', array('oui'=>L_DISPLAY,'non'=>L_HIDE), $v['menu']);
$url = $v['url'];
Expand Down Expand Up @@ -125,16 +125,16 @@ function checkBox(cb) {
<td>
<?php
echo '<input type="hidden" name="staticNum[]" value="'.$new_staticid.'" />';
plxUtils::printInput($new_staticid.'_group', '', 'text', '10-100');
plxUtils::printInput($new_staticid.'_group', '', 'text', '-100');
echo '</td><td>';
plxUtils::printInput($new_staticid.'_name', '', 'text', '10-255');
plxUtils::printInput($new_staticid.'_name', '', 'text', '-255');
plxUtils::printInput($new_staticid.'_template', 'static.php', 'hidden');
echo '</td><td>';
plxUtils::printInput($new_staticid.'_url', '', 'text', '10-255');
plxUtils::printInput($new_staticid.'_url', '', 'text', '-255');
echo '</td><td>';
plxUtils::printSelect($new_staticid.'_active', array('1'=>L_YES,'0'=>L_NO), '0');
echo '</td><td>';
plxUtils::printInput($new_staticid.'_ordre', ++$num, 'text', '1-3');
plxUtils::printInput($new_staticid.'_ordre', ++$num, 'text', '2-3');
echo '</td><td>';
plxUtils::printSelect($new_staticid.'_menu', array('oui'=>L_DISPLAY,'non'=>L_HIDE), '1');
?>
Expand Down
Binary file added core/admin/theme/images/file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/admin/theme/images/progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions core/admin/theme/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -618,4 +618,17 @@ div.ico div {
color: #000;
text-decoration: none;
cursor: pointer;
<<<<<<< f873e59a1417e260bfed80faf1da214f97bc5065
=======
}

#statics-table input:not([type="checkbox"]),
#categories-table input:not([type="checkbox"]),
#users-table input:not([type="checkbox"]) {
width: 100%;
}
input[maxlength="3"] {
width: 4rem !important;
text-align: right;
>>>>>>> Gestion de <input size="xxx" dans les tableaux
}
64 changes: 64 additions & 0 deletions core/admin/upload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php

/**
* Traitement de l'upload des fichiers sur le serveur � partir du gestionnaire de m�dias
*
* @package PLX
* @author Stephane F
**/

include(dirname(__FILE__).'/prepend.php');

# validation du token de s�curit�
if($_SERVER['REQUEST_METHOD']=='POST' AND isset($_SESSION['formtoken'])) {
if(empty($_POST['token']) OR plxUtils::getValue($_SESSION['formtoken'][$_POST['token']]) < time() - 3600) { # 3600 seconds
unset($_SESSION['formtoken']);
die('Security error : invalid or expired token');
}
} else {
die;
}

# S�curisation du chemin du dossier
if(isset($_POST['folder']) AND $_POST['folder']!='.' AND !plxUtils::checkSource($_POST['folder'])) {
$_POST['folder']='.';
}

# Recherche du type de medias � afficher via la session
if(empty($_SESSION['medias'])) {
$_SESSION['medias'] = $plxAdmin->aConf['medias'];
$_SESSION['folder'] = '';
}
elseif(!empty($_POST['folder'])) {
$_SESSION['currentfolder']= (isset($_SESSION['folder'])?$_SESSION['folder']:'');
$_SESSION['folder'] = ($_POST['folder']=='.'?'':$_POST['folder']);
}
# Nouvel objet de type plxMedias
if($plxAdmin->aConf['userfolders'] AND $_SESSION['profil']==PROFIL_WRITER)
$plxMedias = new plxMedias(PLX_ROOT.$_SESSION['medias'].$_SESSION['user'].'/',$_SESSION['folder']);
else
$plxMedias = new plxMedias(PLX_ROOT.$_SESSION['medias'],$_SESSION['folder']);

if(!empty($_POST['token'])) {
$res = $plxMedias->uploadFile($_FILES, $_POST);
/*
switch($res) {
case L_PLXMEDIAS_WRONG_FILESIZE:
plxMsg::Error(L_PLXMEDIAS_WRONG_FILESIZE);
break;
case L_PLXMEDIAS_WRONG_FILEFORMAT:
plxMsg::Error(L_PLXMEDIAS_WRONG_FILEFORMAT);
break;
case L_PLXMEDIAS_UPLOAD_ERR:
plxMsg::Error(L_PLXMEDIAS_UPLOAD_ERR);
break;
case L_PLXMEDIAS_UPLOAD_SUCCESSFUL:
plxMsg::Info(L_PLXMEDIAS_UPLOAD_SUCCESSFUL);
break;
}
*/
$plxMedias->outputJSON($res, ($res == L_PLXMEDIAS_UPLOAD_SUCCESSFUL ? '' : 'error'));

}

exit;
12 changes: 9 additions & 3 deletions core/lib/class.plx.admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,14 @@ public function editUsers($content, $action=false) {
$this->aUsers[$user_id]['profil'] = ($_SESSION['user']==$user_id?$this->aUsers[$user_id]['profil']:$content[$user_id.'_profil']);
$this->aUsers[$user_id]['password'] = $password;
$this->aUsers[$user_id]['salt'] = $salt;
$this->aUsers[$user_id]['email'] = $email;

if(isset($content[$user_id.'_email'])) {
$email = trim($content[$user_id.'_email']);
if(empty($email)) {
$this->aUsers[$user_id]['email'] = '';
} elseif(plxUtils::checkMail($email)) {
$this->aUsers[$user_id]['email'] = $email;
}
}
$this->aUsers[$user_id]['delete'] = (isset($this->aUsers[$user_id]['delete'])?$this->aUsers[$user_id]['delete']:0);
$this->aUsers[$user_id]['lang'] = (isset($this->aUsers[$user_id]['lang'])?$this->aUsers[$user_id]['lang']:$this->aConf['default_lang']);
$this->aUsers[$user_id]['infos'] = (isset($this->aUsers[$user_id]['infos'])?$this->aUsers[$user_id]['infos']:'');
Expand Down Expand Up @@ -1079,4 +1085,4 @@ public function checkMaj() {
}

}
?>
?>
54 changes: 54 additions & 0 deletions core/lib/class.plx.medias.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,60 @@ private function _uploadFile($file, $resize, $thumb) {
return L_PLXMEDIAS_UPLOAD_SUCCESSFUL;
}

/**
* Méthode qui renvoit une sortie au format JSON
*
* @param msg message
* @param statut status erreur
* @author Stephane F
**/
public function outputJSON($msg, $status = 'error') {
header('Content-Type: application/json');
die(json_encode(array(
'data' => $msg,
'status' => $status
)));
}

/**
* Méthode qui envoie un fichier sur le serveur
*
* @param usrfile fichier utilisateur à uploader
* @param post paramètres
* @return msg résultat de l'envoi des fichiers
* @author Stephane F
**/
public function uploadFile($usrfile, $post) {

$file = array(
'name' => $usrfile['myfiles']['name'],
'size' => $usrfile['myfiles']['size'],
'tmp_name' => $usrfile['myfiles']['tmp_name'],
);

$resize = false;
$thumb = false;
if(!empty($post['resize'])) {
if($post['resize']=='user') {
$resize = array('width' => intval($post['user_w']), 'height' => intval($post['user_h']));
} else {
list($width,$height) = explode('x', $post['resize']);
$resize = array('width' => $width, 'height' => $height);
}
}
if(!empty($post['thumb'])) {
if($post['thumb']=='user') {
$thumb = array('width' => intval($post['thumb_w']), 'height' => intval($post['thumb_h']));
} else {
list($width,$height) = explode('x', $post['thumb']);
$thumb = array('width' => $width, 'height' => $height);
}
}

return $this->_uploadFile($file, $resize, $thumb);

}

/**
* Méthode qui envoie une liste de fichiers sur le serveur
*
Expand Down
6 changes: 4 additions & 2 deletions core/lib/class.plx.show.php
Original file line number Diff line number Diff line change
Expand Up @@ -1376,10 +1376,12 @@ public function staticId() {
* @scope static
* @author Florent MONTHEL, Stéphane F
**/
public function staticUrl($type='relatif') {
public function staticUrl($type='relatif', $staticId=false) {

# Recupération ID URL
$staticId = $this->staticId();
if (empty($staticId) or !array_key_exists(str_pad($staticId,3,'0',STR_PAD_LEFT), $this->plxMotor->aStats)) {
$staticId = $this->staticId();
}
$staticIdFill = str_pad($staticId,3,'0',STR_PAD_LEFT);
if(!empty($staticId) AND isset($this->plxMotor->aStats[ $staticIdFill ]))
echo $this->plxMotor->urlRewrite('?static'.$staticId.'/'.$this->plxMotor->aStats[ $staticIdFill ]['url']);
Expand Down
35 changes: 21 additions & 14 deletions core/lib/class.plx.utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,26 @@ public static function printSelect($name, $array, $selected='', $readonly=false,
* @param extra extra paramètre pour du javascript par exemple (onclick)
* @return stdout
**/
public static function printInput($name, $value='', $type='text', $size='50-255', $readonly=false, $class='', $placeholder='', $extra='') {

$size = explode('-',$size);
$placeholder = $placeholder!='' ? ' placeholder="'.$placeholder.'"' : '';
$extra = $extra!='' ? ' '.trim($extra) : '';
if($type!='hidden') {
if($readonly)
echo '<input'.$extra.' id="id_'.$name.'" name="'.$name.'" type="'.$type.'" class="readonly" value="'.$value.'" size="'.$size[0].'" maxlength="'.$size[1].'" readonly="readonly"'.$placeholder.' />'."\n";
else
echo '<input'.$extra.' id="id_'.$name.'" name="'.$name.'" type="'.$type.'"'.($class!=''?' class="'.$class.'"':'').' value="'.$value.'" size="'.$size[0].'" maxlength="'.$size[1].'"'.$placeholder.' />'."\n";
} else {
echo '<input'.$extra.' id="id_'.$name.'" name="'.$name.'" type="'.$type.'" value="'.$value.'" />'."\n";
}
public static function printInput($name, $value='', $type='text', $sizes='50-255', $readonly=false, $className='', $placeholder='', $extra='') {

$params = array(
'id="id_'.$name.'"',
'name="'.$name.'"',
'type="'.$type.'"'
);
if(! empty($value)) { $params[] = 'value="'.$value.'"'; }
if(! empty($extra)) { $params[] = $extra; }
if($type != 'hidden') {
if($readonly === true) { $params[] = 'readony'; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coquille: $params[] = 'readonly';

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, merci.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Après coup, je pense qu'on peut simplifier la déclatation de la fonction plx::printInput(...) en évitant l'emploi de chaines vides comme ceci :

public static function printInput($name, $value='', $type='text', $sizes='50-255', $readonly=false, $className=false, $placeholder=false, $extra=false) { .... }

if(! empty($className)) { $params[] = $className; }
if(! empty($placeholder)) { $params[] = $placeholder; }
if(! empty($sizes) and (strpos($sizes, '-') !== false)) {
list($size, $maxlength) = explode('-', $sizes);
if(! empty($size)) { $params[] = 'size="'.$size.'"'; }
if(! empty($maxlength)) { $params[] = 'maxlength="'.$maxlength.'"'; }
}
}
echo '<input '.implode(' ', $params).'/>';
}

/**
Expand Down Expand Up @@ -1048,4 +1055,4 @@ public static function debug($obj) {
echo "</pre>";
}
}
?>
?>
Loading