Ejemplo n.º 1
0
 $content[] = '</div>';
 $content[] = '</fieldset>';
 $content[] = '<fieldset>';
 $content[] = '<legend><span class=icon-facebook>{LNG_FACEBOOK}</span></legend>';
 // facebook_appId
 $facebook = gcms::getVars($config, 'facebook', array());
 $content[] = '<div class=item>';
 $content[] = '<label for=facebook_appId>{LNG_FACEBOOK_APPID}</label>';
 $content[] = '<span class="g-input icon-password"><input id=facebook_appId name=facebook_appId type=text value="' . gcms::getVars($facebook, 'appId', '') . '" title="{LNG_FACEBOOK_COMMENT}"></span>';
 $content[] = '</div>';
 // facebook_picture
 $content[] = '<div class=item>';
 $image = is_file(DATA_PATH . 'image/facebook_photo.jpg') ? DATA_URL . 'image/facebook_photo.jpg' : WEB_URL . '/skin/img/blank.gif';
 $content[] = '<div class=usericon><span><img src="' . $image . '" alt="Facebook Picture" id=fbPicture></span></div>';
 $content[] = '<label for=facebook_picture>{LNG_BROWSE_FILE}</label>';
 $content[] = '<span class="g-input icon-upload"><input class=g-file id=facebook_picture name=facebook_picture type=file title="{LNG_FACEBOOK_PICTURE_COMMENT}" accept="' . gcms::getEccept(array('jpg')) . '" data-preview=fbPicture></span>';
 $content[] = '<div class=comment id=result_facebook_picture>{LNG_FACEBOOK_PICTURE_COMMENT}</div>';
 $content[] = '</div>';
 $content[] = '<aside class=message>{LNG_FACEBOOK_REDIRECT_URL} <em>{WEBURL}/index.php</em></aside>';
 $content[] = '</fieldset>';
 // submit
 $content[] = '<fieldset class=submit>';
 $content[] = '<input type=submit class="button large save" value="{LNG_SAVE}">';
 $content[] = '</fieldset>';
 $content[] = '</form>';
 $content[] = '</section>';
 $content[] = '<script>';
 $content[] = '$G(window).Ready(function(){';
 $content[] = 'new GForm("setup_frm","saveconfig.php").onsubmit(doFormSubmit);';
 $content[] = '});';
 $content[] = '</script>';
Ejemplo n.º 2
0
 $content[] = '<label for=textlink_target>{LNG_MENU_TARGET}</label>';
 $content[] = '<span class="g-input icon-forward"><select name=textlink_target id=textlink_target title="{LNG_MENU_TARGET_COMMENT}">';
 foreach ($lng['MENU_TARGET'] as $key => $value) {
     $sel = $key == $textlink['target'] ? ' selected' : '';
     $content[] = '<option value="' . $key . '"' . $sel . '>' . $value . '</option>';
 }
 $content[] = '</select></span>';
 $content[] = '<div class=comment>{LNG_MENU_TARGET_COMMENT}</div>';
 $content[] = '</div>';
 // logo
 $content[] = '<div class=item>';
 $logo = DATA_PATH . 'image/' . $textlink['logo'];
 $logo = is_file($logo) ? DATA_URL . 'image/' . $textlink['logo'] : '../skin/img/blank.gif';
 $content[] = '<div class=usericon><span><img id=textlink_logo src="' . $logo . '" alt=logo></span></div>';
 $content[] = '<label for=textlink_file>{LNG_IMAGE} {LNG_UPLOAD}</label>';
 $content[] = '<span class="g-input icon-upload"><input type=file class=g-file name=textlink_file id=textlink_file title="{LNG_TEXTLINK_LOGO_COMMENT}" accept="' . gcms::getEccept(array('jpg', 'png', 'gif')) . '" data-preview=textlink_logo></span>';
 $content[] = '<div class=comment id=result_textlink_file>{LNG_TEXTLINK_LOGO_COMMENT}</div>';
 $content[] = '</div>';
 $content[] = '</fieldset>';
 $content[] = '<fieldset>';
 $content[] = '<legend><span>{LNG_TEXTLINK_PUBLISHED}</span></legend>';
 // start,end
 $content[] = '<div class=item>';
 $content[] = '<label for=textlink_publish_start>{LNG_PUBLISHED_START}</label>';
 $content[] = '<span class="table g-input icon-calendar"><input type=date id=textlink_publish_start name=textlink_publish_start value="' . date('Y-m-d', $textlink['publish_start']) . '" title="{LNG_PUBLISHED_START}"></span>';
 $content[] = '</div>';
 $content[] = '<div class=item>';
 $content[] = '<label for=textlink_publish_end>{LNG_PUBLISHED_END}</label>';
 $content[] = '<div class="table collapse">';
 $content[] = '<div class=td><span class="g-input icon-calendar"><input type=date id=textlink_publish_end name=textlink_publish_end value="' . date('Y-m-d', $textlink['publish_end']) . '" title="{LNG_PUBLISHED_END}"' . ($textlink['publish_end'] == 0 ? ' disabled' : '') . '></span></div>';
 $content[] = '<label class=td>&nbsp;{LNG_DATELESS}&nbsp;<input type=checkbox id=textlink_dateless name=textlink_dateless value=1' . ($textlink['publish_end'] == 0 ? ' checked' : '') . '></label>';
Ejemplo n.º 3
0
 $content[] = '<label for=config_icon_category_type>{LNG_IMAGE_FILE_TYPIES}</label>';
 $content[] = '<div>';
 $icon_category_typies = explode(',', $index['icon_category_type']);
 foreach (array('jpg', 'gif', 'png') as $i => $item) {
     $chk = in_array($item, $icon_category_typies) ? ' checked' : '';
     $d = $item == 'jpg' ? ' id=config_icon_category_type' : '';
     $content[] = '<label><input type=checkbox' . $chk . $d . ' name=config_icon_category_type[] value=' . $item . ' title="{LNG_IMAGE_UPLOAD_TYPE_COMMENT}"> ' . $item . '</label>';
 }
 $content[] = '</div>';
 $content[] = '<div class=comment id=result_config_icon_category_type>{LNG_IMAGE_UPLOAD_TYPE_COMMENT}</div>';
 $content[] = '</div>';
 // default_icon
 $content[] = '<div class=item>';
 $content[] = '<div class=usericon><span><img id=img_default_icon src="' . WEB_URL . '/' . $index['default_icon'] . '" alt=default_icon></span></div>';
 $content[] = '<label for=config_default_icon>{LNG_BROWSE_FILE}</label>';
 $content[] = '<span class="g-input icon-upload"><input type=file class=g-file id=config_default_icon name=config_default_icon title="{LNG_DEFAULT_ICON_COMMENT}" accept="' . gcms::getEccept(array('jpg', 'png', 'gif')) . '" data-preview=img_default_icon></span>';
 $content[] = '<div class=comment id=result_config_default_icon>{LNG_DEFAULT_ICON_COMMENT}</div>';
 $content[] = '</div>';
 $content[] = '</fieldset>';
 // การแสดงผล
 $content[] = '<fieldset>';
 $content[] = '<legend><span>{LNG_DISPLAY}</span></legend>';
 // list_per_page
 $content[] = '<div class=item>';
 $content[] = '<label for=config_list_per_page>{LNG_QUANTITY}</label>';
 $content[] = '<span class="g-input icon-published1"><input type=number name=config_list_per_page id=config_list_per_page value="' . $index['list_per_page'] . '" title="{LNG_LIST_PER_PAGE_COMMENT}"></span>';
 $content[] = '<div class=comment>{LNG_LIST_PER_PAGE_COMMENT}</div>';
 $content[] = '</div>';
 // new_date
 $content[] = '<div class=item>';
 $new_date = $index['new_date'] / 86400;
Ejemplo n.º 4
0
 $a = array();
 $a[] = '<span class=icon-gallery>{LNG_MODULES}</span>';
 $a[] = '<a href="{URLQUERY?module=gallery-config&id=0}">{LNG_GALLERY}</a>';
 $a[] = '<a href="{URLQUERY?module=gallery-album&id=0}">{LNG_GALLERY_ALBUM}</a>';
 $a[] = '{LNG_GALLERY_UPLOAD}';
 // แสดงผล
 $content[] = '<div class=breadcrumbs><ul><li>' . implode('</li><li>', $a) . '</li></ul></div>';
 $content[] = '<section>';
 $content[] = '<header><h1 class=icon-upload>' . $title . '&nbsp;{LNG_GALLERY_ALBUM}&nbsp;' . $index['topic'] . '</h1></header>';
 $content[] = '<div id=gallery-upload class=setup_frm>';
 $content[] = '<div class=paper>';
 $content[] = '<form id=upload_frm method=post action="' . WEB_URL . '/modules/gallery/admin_upload_save.php">';
 $content[] = '<fieldset>';
 $content[] = '<legend><span>{LNG_GALLERY_UPLOAD}</span></legend>';
 $content[] = '<div class=item>';
 $content[] = '<label><input type=file name=fileupload id=fileupload accept="' . gcms::getEccept($config['gallery_image_type']) . '"></label>';
 $content[] = '<div class=comment id=result_fileupload>' . str_replace(array('{TYPE}', '{SIZE}', '{COUNT}'), array(implode(', ', $config['gallery_image_type']), ini_get('upload_max_filesize'), 10), $lng['LNG_GALLERY_UPLOAD_COMMENT']) . '</div>';
 $content[] = '</div>';
 $content[] = '</fieldset>';
 $content[] = '<fieldset class=submit>';
 $content[] = '<input type=submit class="button large green" value="{LNG_UPLOAD}">';
 $content[] = '<input type=button class="button large orange" value="{LNG_UPLOAD_CANCLE}" id=btnCancle disabled>';
 $content[] = '<input type=button class="button large blue" value="{LNG_SELECT_ALL}" id=selectAll>';
 $content[] = '<input type=button class="button large pink" value="{LNG_CLEAR_SELECTED}" id=clearSelected>';
 $content[] = '<input type=button class="button large red" value="{LNG_DELETE}" id=btnDelete>';
 $content[] = '<input type=hidden id=gallery_module value="' . $index['module'] . '">';
 $content[] = '<input type=hidden id=album_id value="' . $index['id'] . '">';
 $content[] = '</fieldset>';
 $content[] = '</form>';
 $content[] = '<div id=fsUploadProgress class=clear></div>';
 $content[] = '</div>';
Ejemplo n.º 5
0
     $content[] = '</div>';
     // detail
     $content[] = '<div class=item>';
     $content[] = '<div>';
     $content[] = '<label for=category_detail_' . $item . '>{LNG_DESCRIPTION}</label>';
     $t = isset($detail[$item]) ? $detail[$item] : (isset($detail['']) && (!$multi_language || $item == LANGUAGE && !isset($detail[LANGUAGE])) ? $detail[''] : '');
     $content[] = '<span class="g-input icon-file"><textarea id=category_detail_' . $item . ' name=category_detail[' . $item . '] rows=3 maxlength=200 title="{LNG_CATEGORY_DESCRIPTION_COMMENT}">' . gcms::detail2TXT($t) . '</textarea></span>';
     $content[] = '</div>';
     $content[] = '<div class=comment id=result_category_detail_' . $item . '>{LNG_CATEGORY_DESCRIPTION_COMMENT}</div>';
     $content[] = '</div>';
     // icon
     $content[] = '<div class=item>';
     $t = isset($icon[$item]) ? $icon[$item] : (isset($icon['']) && (!$multi_language || $item == LANGUAGE && !isset($icon[LANGUAGE])) ? $icon[''] : '');
     $content[] = '<div class=usericon><span><img id=icon_' . $item . ' src=' . (is_file(DATA_PATH . "document/{$t}") ? DATA_URL . "document/{$t}" : WEB_URL . "/{$index['default_icon']}") . ' alt=icon></span></div>';
     $content[] = '<label for=category_icon_' . $item . '>{LNG_ICON}</label>';
     $content[] = '<span class="g-input icon-upload"><input type=file class=g-file id=category_icon_' . $item . ' name=category_icon_' . $item . ' title="{LNG_UPLOAD_CATEGORY_ICON_COMMENT}" accept="' . gcms::getEccept(array('jpg', 'png', 'gif')) . '" data-preview=icon_' . $item . '></span>';
     $content[] = '<div class=comment id=result_category_icon_' . $item . '>{LNG_UPLOAD_CATEGORY_ICON_COMMENT}</div>';
     $content[] = '</div>';
     $content[] = '</fieldset>';
 }
 // submit
 $content[] = '<fieldset class=submit>';
 $content[] = '<input type=submit class="button large save" value="{LNG_SAVE}">';
 $content[] = gcms::get2Input($_GET);
 $content[] = '<input type=hidden id=write_id name=write_id value=' . (int) $index['id'] . '>';
 $content[] = '<input type=hidden id=module_id name=module_id value=' . $index['module_id'] . '>';
 $content[] = '</fieldset>';
 $content[] = '</form>';
 $content[] = '</section>';
 $content[] = '<script>';
 $content[] = 'inintWriteCategory("document");';
Ejemplo n.º 6
0
 if ($id == '') {
     $content[] = '<div class=item>';
     $content[] = '<label for=lang_copy>{LNG_LANGUAGE_COPY}</label>';
     $content[] = '<span class="g-input icon-language"><select name=lang_copy id=lang_copy>';
     $content[] = '<option value=0>{LNG_NOT_COPY}</option>';
     foreach ($config['languages'] as $item) {
         $content[] = '<option value=' . $item . '>' . $item . '</option>';
     }
     $content[] = '</select></span>';
     $content[] = '</div>';
 }
 $icon = is_file(DATA_PATH . "language/{$id}.gif") ? DATA_URL . "language/{$id}.gif" : "../skin/img/blank.gif";
 $content[] = '<div class=item>';
 $content[] = '<div class=usericon><span><img id=language_icon src=' . $icon . ' alt=Icon></span></div>';
 $content[] = '<label for=lang_icon>{LNG_ICON}</label>';
 $content[] = '<span class="g-input icon-upload"><input class=g-file type=file name=lang_icon id=lang_icon placeholder="{LNG_BROWSE_FILE}" accept="' . gcms::getEccept(array('gif')) . '" data-preview=language_icon></span>';
 $content[] = '</div>';
 $content[] = '</fieldset>';
 // submit
 $content[] = '<fieldset class=submit>';
 $content[] = '<input type=submit class="button large save" value="{LNG_SAVE}">';
 $content[] = '<input type=hidden name=save_id value="' . $id . '">';
 $content[] = '<input type=hidden name=languageadd value=1>';
 $content[] = '</fieldset>';
 $content[] = '</form>';
 $content[] = '</section>';
 $content[] = '<script>';
 $content[] = '$G(window).Ready(function(){';
 $content[] = 'new GForm("setup_frm", "' . WEB_URL . '/admin/language_save.php").onsubmit(doFormSubmit);';
 $content[] = '});';
 $content[] = '</script>';
Ejemplo n.º 7
0
     $d = sprintf('%02d', $i);
     $sel = $d == $match[3] ? ' selected' : '';
     $content[] = '<option value=' . $d . $sel . '>' . $d . '</option>';
 }
 $content[] = '</select></label>';
 $content[] = '</div>';
 $content[] = '<div class=comment>{LNG_ARTICLE_DATE_COMMENT}</div>';
 $content[] = '</div>';
 if ($index['img_typies'] != '') {
     // picture
     $content[] = '<div class=item>';
     $t = str_replace(array('{T}', '{W}', '{H}'), array($index['img_typies'], $index['icon_width'], $index['icon_height']), $lng['LNG_IMAGE_UPLOAD_COMMENT']);
     $image = is_file(DATA_PATH . "document/{$index['picture']}") ? DATA_URL . "document/{$index['picture']}" : WEB_URL . "/{$index['default_icon']}";
     $content[] = '<div class=usericon><span><img src="' . $image . '" alt=Thumbnail id=imgLogo></span></div>';
     $content[] = '<label for=write_picture>{LNG_THUMBNAIL}</label>';
     $content[] = '<span class="g-input icon-upload"><input class=g-file type=file id=write_picture name=write_picture title="' . $t . '" accept="' . gcms::getEccept(explode(',', $index['img_typies'])) . '" data-preview=imgLogo></span>';
     $content[] = '<div class=comment id=result_write_picture>' . $t . '</div>';
     $content[] = '</div>';
 }
 // category
 $content[] = '<div class=item>';
 $content[] = '<label for=category_' . $index['module_id'] . '>{LNG_CATEGORY}</label>';
 $content[] = '<span class="g-input icon-category"><select id=category_' . $index['module_id'] . ' name=write_category title="{LNG_CATEGORY_SELECT}">';
 $content[] = '<option value=0>{LNG_NO_CATEGORY}</option>';
 $sql = "SELECT `category_id`,`topic` FROM `" . DB_CATEGORY . "` WHERE `module_id`='{$index['module_id']}' ORDER BY `category_id`";
 foreach ($db->customQuery($sql) as $item) {
     $sel = $index['category_id'] == $item['category_id'] ? ' selected' : '';
     $content[] = '<option value=' . $item['category_id'] . $sel . '>' . gcms::ser2Str($item, 'topic') . '</option>';
 }
 $content[] = '</select></span>';
 $content[] = '<div class=comment id=result_category_' . $index['module_id'] . '>{LNG_CATEGORY_SELECT}</div>';
Ejemplo n.º 8
0
 $content[] = '<label for=gallery_topic>{LNG_GALLERY_ALBUM}</label>';
 $content[] = '<span class="g-input icon-edit"><input type=text id=gallery_topic name=gallery_topic maxlength=64 title="{LNG_GALLERY_ALBUM_COMMENT}" value="' . $index['topic'] . '"></span>';
 $content[] = '<div class=comment id=result_gallery_topic>{LNG_GALLERY_ALBUM_COMMENT}</div>';
 $content[] = '</div>';
 // detail
 $content[] = '<div class=item>';
 $content[] = '<label for=gallery_detail>{LNG_DESCRIPTION}</label>';
 $content[] = '<span class="g-input icon-file"><textarea id=gallery_detail name=gallery_detail rows=3 maxlength=200 title="{LNG_GALLERY_ALBUM_DESCRIPTION_COMMENT}">' . gcms::detail2TXT($index, 'detail') . '</textarea></span>';
 $content[] = '<div class=comment id=result_gallery_detail>{LNG_GALLERY_ALBUM_DESCRIPTION_COMMENT}</div>';
 $content[] = '</div>';
 // icon
 $content[] = '<div class=item>';
 $icon = !empty($index['image']) && is_file(DATA_PATH . "gallery/{$index['id']}/thumb_{$index['image']}") ? DATA_URL . "gallery/{$index['id']}/thumb_{$index['image']}" : WEB_URL . '/modules/gallery/img/nopicture.png';
 $content[] = '<div class=usericon><span><img src="' . $icon . '" id=imgIcon alt=imgIcon></span></div>';
 $content[] = '<label for=gallery_pic>{LNG_BROWSE_FILE}</label>';
 $content[] = '<span class="g-input icon-upload"><input type=file class=g-file id=gallery_pic name=gallery_pic accept="' . gcms::getEccept($config['gallery_image_type']) . '" title="{LNG_IMAGE_UPLOAD_RESIZE_COMMENT}" data-preview=imgIcon></span>';
 $content[] = '<div class=comment id=result_gallery_pic>{LNG_IMAGE_UPLOAD_RESIZE_COMMENT}</div>';
 $content[] = '</div>';
 $content[] = '</fieldset>';
 // submit
 $content[] = '<fieldset class=submit>';
 $content[] = '<input type=submit class="button large save" value="{LNG_SAVE}">';
 $content[] = '<input type=hidden id=galleryId name=galleryId value=' . (int) $index['id'] . '>';
 $content[] = '</fieldset>';
 $content[] = '</form>';
 $content[] = '</section>';
 $content[] = '<script>';
 $content[] = '$G(window).Ready(function(){';
 $content[] = 'new GForm("setup_frm","' . WEB_URL . '/modules/gallery/admin_write_save.php").onsubmit(doFormSubmit);';
 $content[] = '});';
 $content[] = '</script>';
Ejemplo n.º 9
0
 $content[] = '<div class=item>';
 $content[] = '<label for=write_phone>{LNG_PHONE}</label>';
 $content[] = '<span class="g-input icon-phone"><input type=text pattern="[0-9]+" id=write_phone name=write_phone maxlength=20 title="{LNG_PLEASE_FILL}" value="' . $index['phone'] . '"></span>';
 $content[] = '</div>';
 // email
 $content[] = '<div class=item>';
 $content[] = '<label for=write_email>{LNG_EMAIL}</label>';
 $content[] = '<span class="g-input icon-email"><input type=email id=write_email name=write_email maxlength=255 title="{LNG_PLEASE_FILL}" value="' . $index['email'] . '"></span>';
 $content[] = '</div>';
 // picture
 $content[] = '<div class=item>';
 $t = str_replace(array('{T}', '{W}', '{H}'), array('jpg', $config['personnel_image_w'], $config['personnel_image_h']), $lng['LNG_IMAGE_UPLOAD_COMMENT']);
 $picture = $index['picture'] != '' && is_file(DATA_PATH . "personnel/{$index['picture']}") ? DATA_URL . "personnel/{$index['picture']}" : WEB_URL . '/modules/personnel/img/noicon.jpg';
 $content[] = '<div class=usericon><span><img src="' . $picture . '" id=imgIcon alt=UserIcon></span></div>';
 $content[] = '<label for=write_picture>{LNG_IMAGE}</label>';
 $content[] = '<span class="g-input icon-upload"><input type=file class=g-file id=write_picture name=write_picture title="' . $t . '" accept="' . gcms::getEccept(array('jpg', 'png', 'gif')) . '" data-preview=imgIcon></span>';
 $content[] = '<div class=comment id=result_write_picture>' . $t . '</div>';
 $content[] = '</fieldset>';
 // submit
 $content[] = '<fieldset class=submit>';
 $content[] = '<input type=submit class="button large save" value="{LNG_SAVE}">';
 $content[] = '<input type=hidden id=write_id name=write_id value=' . (int) $index['id'] . '>';
 $content[] = '</fieldset>';
 $content[] = '</form>';
 $content[] = '</section>';
 $content[] = '<script>';
 $content[] = '$G(window).Ready(function(){';
 $content[] = 'new GForm("setup_frm","' . WEB_URL . '/modules/personnel/admin_write_save.php").onsubmit(doFormSubmit);';
 $content[] = '});';
 $content[] = '</script>';
 // หน้านี้
Ejemplo n.º 10
0
     $user['subscrib'] = 1;
     $user['invite'] = '';
     $user['admin_access'] = 0;
     $user['provinceID'] = '';
 }
 if (is_array($user)) {
     $title = $id == 0 ? '{LNG_REGISTER_TITLE}' : '{LNG_MEMBER_EDIT_TITLE}';
     $patt2 = array('/{TITLE}/', '/{(LNG_[A-Z0-9_]+)}/e', '/\\%1/', '/\\%2/', '/\\%3/', '/{ADMIN}/', '/{ACCEPT}/');
     $replace2 = array();
     $replace2[] = $title;
     $replace2[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
     $replace2[] = $config['user_icon_w'];
     $replace2[] = $config['user_icon_h'] == 0 ? $config['user_icon_w'] : $config['user_icon_h'];
     $replace2[] = empty($config['user_icon_typies']) ? 'jpg' : implode(', ', $config['user_icon_typies']);
     $replace2[] = $isAdmin && $user['fb'] == 0 ? '' : 'disabled';
     $replace2[] = gcms::getEccept(array('jpg', 'png', 'gif'));
     foreach ($user as $key => $value) {
         $patt2[] = '/{' . strtoupper($key) . '}/';
         if ($key == 'sex') {
             // เพศ
             $datas = array();
             foreach ($lng['SEX'] as $sex => $name) {
                 $sel = $sex == $user['sex'] ? ' selected' : '';
                 $datas[] = '<option value=' . $sex . $sel . '>' . $name . '</option>';
             }
             $replace2[] = implode('', $datas);
         } elseif ($key == 'country') {
             // รายชื่อประเทศ
             $user['country'] = $user['country'] == '' ? 'TH' : $user['country'];
             $datas = array();
             $sql = "SELECT `iso`,`printable_name` FROM `" . DB_COUNTRY . "`";