'.$args['title'].''; echo $html; } public static function formOpen($args) { $class = empty($args['class']) ? '' : ' '.$args['class']; $id = empty($args['id']) ? '' : 'id="'.$args['id'].'"'; $html = '
'; echo $html; } public static function formClose() { $html = '
'; echo $html; } // label, name, value, tip public static function formInputText($args) { $id = 'js'.$args['name']; $type = isset($args['type']) ? $args['type'] : 'text'; $class = empty($args['class']) ? '' : 'class="'.$args['class'].'"'; $placeholder = empty($args['placeholder']) ? '' : 'placeholder="'.$args['placeholder'].'"'; $disabled = empty($args['disabled']) ? '' : 'disabled'; $html = '
'; if(!empty($args['label'])) { $html .= ''; } $html .= '
'; $html .= ''; if(!empty($args['tip'])) { $html .= '

'.$args['tip'].'

'; } $html .= '
'; $html .= '
'; echo $html; } public static function formInputPassword($args) { $args['type'] = 'password'; self::formInputText($args); } public static function formTextarea($args) { $id = 'js'.$args['name']; $type = isset($args['type']) ? $args['type'] : 'text'; $class = empty($args['class']) ? '' : 'class="'.$args['class'].'"'; $placeholder = empty($args['placeholder']) ? '' : 'placeholder="'.$args['placeholder'].'"'; $rows = empty($args['rows']) ? '' : 'rows="'.$args['rows'].'"'; $html = '
'; if(!empty($args['label'])) { $html .= ''; } $html .= '
'; $html .= ''; if(!empty($args['tip'])) { $html .= '

'.$args['tip'].'

'; } $html .= '
'; $html .= '
'; echo $html; } public static function formSelect($args) { $id = 'js'.$args['name']; $type = isset($args['type']) ? $args['type'] : 'text'; $class = empty($args['class']) ? '' : 'class="'.$args['class'].'"'; $html = '
'; $html .= ''; $html .= '
'; $html .= ''; $html .= '

'.$args['tip'].'

'; $html .= '
'; $html .= '
'; echo $html; } public static function formInputHidden($args) { $id = 'js'.$args['name']; $html = ''; echo $html; } public static function legend($args) { $class = empty($args['class']) ? '' : 'class="'.$args['class'].'"'; $html = ''.$args['value'].''; echo $html; } public static function formButtonSubmit($args) { $html = ''; } public static function bluditQuickImages() { $html = ''; $html .= '
'; $thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','*',true); array_splice($thumbnailList, THUMBNAILS_AMOUNT); foreach($thumbnailList as $file) { $filename = basename($file); $html .= 'Thumbnail'; } $html .= '
More images
'; echo $html; } public static function bluditCoverImage($coverImage="") { global $L; $style = ''; if(!empty($coverImage)) { $style = 'background-image: url('.HTML_PATH_UPLOADS_THUMBNAILS.$coverImage.')'; } $html = ''; $html .= '
'.$L->g('Cover image').'
'.$L->g('Drag and drop or click here').'
0%
'; $script = ' '; echo $html.$script; } public static function bluditImagesV8() { global $L; $html = ''; $html .= '
'.$L->g('Upload image').'
'.$L->g('Drag and drop or click here').'
0%
'; $thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','*',true); foreach($thumbnailList as $file) { $filename = basename($file); $html .= 'Thumbnail'; } $html .= '
'; $script = ' '; echo $html.$script; } public static function profileUploader($username) { global $L; $html = ''; $html .= '
'; if(file_exists(PATH_UPLOADS_PROFILES.$username.'.png')) { $html .= 'Profile picture'; } else { $html .= '
'.$L->g('Profile picture').'
'; } $html .= '
0%
'.$L->g('Upload image').'
'.$L->g('Drag and drop or click here').'
'; $script = ' '; echo $html.$script; } }