PluginProbe
wpForo Forum / 1.4.2
wpForo Forum v1.4.2
3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.2 All 137 releases
wpforo / wpf-admin / phrase.php

phrase.php in wpForo Forum 1.4.2, at wpf-admin/phrase.php

68 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if( !defined( 'ABSPATH' ) ) exit;
4 if( !current_user_can('administrator') ) exit;
5 ?>
6
7 <div id="wpf-admin-wrap" class="wrap" style="margin-top: 0px">
8 <?php wpforo_screen_option() ?>
9 <div id="icon-users" class="icon32"><br></div>
10 <h2 style="padding:30px 0px 0px 0px;line-height: 20px; margin-bottom:15px;"><?php _e('Front-end Phrases', 'wpforo'); ?> &nbsp;<a href="<?php echo admin_url( 'admin.php?page=wpforo-phrases&action=add' ) ?>" class="add-new-h2"><?php wpforo_phrase('add_new') ?></a></h2>
11 <?php $wpforo->notice->show(FALSE) ?>
12 <?php
13 if( !((isset($_GET['action']) && $_GET['action'] != '-1') || (isset($_GET['action2']) && $_GET['action2'] != '-1')) ){
14 $fields = array( 'phrase_key', 'phrase_value', 'package' );
15 $search_fields = array( 'phrase_key', 'phrase_value' );
16 $filter_fields = array( 'langid', 'package' );
17 wpforo_create_form_table( 'phrase', 'phraseid', $fields, $search_fields, $filter_fields, array('edit'), array('edit'));
18 }
19 ?>
20 <?php if( (isset($_GET['action']) && $_GET['action'] == 'edit') || (isset($_GET['action2']) && $_GET['action2'] == 'edit') ) : ?>
21 <?php if(isset($_GET['id'])){$phrase_ids = array($_GET['id']);}else{ $phrase_ids = explode(',', $_GET['ids']);} ?>
22 <form action="" method="POST" id="phrases" class="validate">
23 <?php wp_nonce_field( 'wpforo-phrases-edit' ); ?>
24 <table class="form-table">
25 <tbody>
26 <?php foreach($phrase_ids as $phraseid) : ?>
27 <tr class="form-field form-required">
28 <th scope="row">
29 <?php $data = $wpforo->phrase->get_wpforo_phrase($phraseid); ?>
30 <label for="phrase"> <?php wpforo_phrase('phrase_key'); ?>
31 <span class="description">(<?php echo esc_html($data['phrase_key']); ?>)</span></label>
32 </th>
33 <td>
34 <textarea name="phrase[data][<?php echo intval($phraseid) ?>][title]" id="phrase" required style="width:80%; height:29px;"><?php wpfo($data['phrase_value'], true, 'esc_textarea'); ?></textarea>
35 </td>
36 </tr>
37 <?php endforeach; ?>
38 </tbody>
39 </table>
40 <p class="submit">
41 <input type="submit" name="phrase[save]" id="createusersub" class="button button-primary" value="<?php wpforo_phrase('update') ?>">
42 </p>
43 </form>
44 <?php endif; ?>
45 <?php if( (isset($_GET['action']) && $_GET['action'] == 'add')) : ?>
46 <form action="" method="POST" id="phrases" class="validate">
47 <?php wp_nonce_field( 'wpforo-phrase-add' ); ?>
48 <table class="form-table">
49 <tbody>
50 <tr class="form-field form-required">
51 <th scope="row">
52 <label for="phrase_key"> <?php wpforo_phrase('phrase_key') ?></label>
53 </th>
54 <td><input name="phrase[key]" type="text" id="phrase_key" value="" required="" required></td>
55
56 <th scope="row">
57 <label for="phrase_value"> <?php wpforo_phrase('phrase_value') ?></label>
58 </th>
59 <td><input name="phrase[value]" type="text" id="phrase_value" required="" value="" required></td>
60 </tr>
61 </tbody>
62 </table>
63 <p class="submit">
64 <input type="submit" name="phrase[add]" id="createusersub" class="button button-primary" value="<?php wpforo_phrase('add') ?>">
65 </p>
66 </form>
67 <?php endif; ?>
68 </div>