Changeset 2282302
- Timestamp:
- 04/13/2020 09:44:03 AM (6 years ago)
- Location:
- tinywebdb-api
- Files:
-
- 2 added
- 10 edited
- 1 copied
-
tags/0.2.10 (copied) (copied from tinywebdb-api/trunk)
-
tags/0.2.10/README.md (added)
-
tags/0.2.10/menus.php (modified) (7 diffs)
-
tags/0.2.10/readme.txt (modified) (2 diffs)
-
tags/0.2.10/screenshot-1.png (modified) (previous)
-
tags/0.2.10/tinywebdb-api.php (modified) (8 diffs)
-
tags/0.2.10/tinywebdb.php (modified) (1 diff)
-
trunk/README.md (added)
-
trunk/menus.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/screenshot-1.png (modified) (previous)
-
trunk/tinywebdb-api.php (modified) (8 diffs)
-
trunk/tinywebdb.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tinywebdb-api/tags/0.2.10/menus.php
r1818322 r2282302 95 95 $setting_apikey = get_option("wp_tinywebdb_api_key"); 96 96 97 echo '<form method="post" action="">';98 97 echo '<table class="form-table">'; 99 98 ?> … … 107 106 <th class="manage-column" scope="col">Controller</th> 108 107 <th class="manage-column" scope="col">Description</th> 109 </tr> 110 </thead> 111 <tfoot> 112 <tr> 113 <th class="manage-column check-column" scope="col"></th> 114 <th class="manage-column" scope="col">Controller</th> 115 <th class="manage-column" scope="col">Description</th> 108 <th class="manage-column" scope="col">API</th> 116 109 </tr> 117 110 </tfoot> … … 125 118 <td class="desc"> 126 119 <p>Basic introspection methods</p> 120 </td> 121 <td class="desc"> 127 122 <p><code><a href="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/info/">info</a></code></p> 128 123 </td> … … 136 131 <td class="desc"> 137 132 <p>Get dara from your post by Post ID or Slug </p> 138 <p><code><a href="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/getvalue/">getvalue</a></code></p> 133 </td> 134 <td class="desc"> 135 <form action="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/getvalue" method="post" enctype=application/x-www-form-urlencoded> 136 Tag:<input type="text" name="tag" /> 137 <input type="hidden" name="fmt" value="html"> 138 <input type="submit" value="Get value"> 139 </form> 139 140 </td> 140 141 </tr> … … 148 149 <td class="desc"> 149 150 <p>Store data on a your post by Post ID or Slug </p> 150 <p><code><a href="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/storeavalue/">storeavalue</a></code></p> 151 </td> 152 <td class="desc"> 153 <form action="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/storeavalue" method="post" enctype=application/x-www-form-urlencoded> 154 Tag:<input type="text" name="tag"/> 155 Value:<input type="text" name="value" size="30"/> 156 <input type="hidden" name="fmt" value="html"> 157 <input type="submit" value="Store a value"> 158 </form> 151 159 </td> 152 160 </tbody> … … 157 165 <h3>Address</h3> 158 166 167 <form method="post" action=""> 159 168 <table class="form-table"> 160 169 <tr valign="top"> 161 170 <th scope="row">API base</th> 162 <td><input name="urltrigger" type="text" id="urltrigger" value="<?php echo $setting_url_trigger; ?>" size="50" /><br/>Specify a base URL for TinyWebDB API. For example, using api as your API base URL would enable the following <?php echo get_option('home'); ?>/api/.You can change the <em>api</em> part of your TinyWebDB APIs to something else. Enter without slashes.</td>171 <td><input name="urltrigger" type="text" id="urltrigger" value="<?php echo $setting_url_trigger; ?>" size="50" /><br/>Specify a base URL for TinyWebDB API. For example, using 'api' as your API base URL would enable the following '<?php echo get_option('home'); ?>/api/'. <br>You can change the <em>api</em> part of your TinyWebDB APIs to something else. Enter without slashes.</td> 163 172 </tr> 164 173 165 174 <tr valign="top"> 166 175 <th scope="row">API Key</th> 167 <td><input name="apikey" type="text" id="apikey" value="<?php echo $setting_apikey; ?>" size="50" /><br/>Set api key to protect your TinyWebDB API. Client mast set same api key to Store A Value to your site </td>176 <td><input name="apikey" type="text" id="apikey" value="<?php echo $setting_apikey; ?>" size="50" /><br/>Set api key to protect your TinyWebDB API. Client mast set same api key to Store A Value to your site. (This function no ready)</td> 168 177 </tr> 169 178 … … 176 185 </tr> 177 186 187 </table> 188 <input name="issubmitted" type="hidden" value="yes" /> 189 <p class="submit"><input type="submit" name="Submit" value="Save settings" /></p> 190 </form> 191 178 192 <?php 179 echo '</table>';180 echo '<input name="issubmitted" type="hidden" value="yes" />';181 echo '<p class="submit"><input type="submit" name="Submit" value="Save settings" /></p>';182 echo '</form>';183 193 wp_tinywebdb_api_footer(); 184 194 echo '</div>'; -
tinywebdb-api/tags/0.2.10/readme.txt
r1818322 r2282302 2 2 3 3 Contributors: chen420 4 Plugin URI: https://github.com/ edu2web/tinywebdb-api4 Plugin URI: https://github.com/TinyWebDB/tinywebdb-api 5 5 Author URI: https://github.com/chen420 6 Document URI: http:// edu2web.com/tinywebdb-api/7 Donate link: http://edu2web.com/tinywebdb-api/donate/6 Document URI: http://api.edu2web.com/tinywebdb-api/ 7 Donate link: http://api.edu2web.com/tinywebdb-api/donate/ 8 8 Tags: appinventor, tinywebdb, api 9 9 Requires at least: 4.0 10 10 Requires PHP: 5.2.4 11 Tested up to: 4.912 Stable tag: 0.2. 911 Tested up to: 5.4 12 Stable tag: 0.2.11 13 13 License: GPLv2 or later 14 14 License URI: http://www.gnu.org/licenses/gpl-2.0.html 15 15 16 16 a AppInventor TinyWebDB API plugin, use you WordPress as a TinyWebDB web service. 17 We also have lso have a TinyWebDB implementation based on PHP and textfile. No database is required. 18 https://github.com/TinyWebDB/tinywebdb-php 17 19 18 20 … … 94 96 Active "Store A Value" and some enhancement. 95 97 98 = 0.2.9 = 99 Active log viewer and some enhancement. 100 101 = 0.2.11 = 102 App PHP7 support. 103 App test form on admin page. 104 96 105 = 1.0.0 = -
tinywebdb-api/tags/0.2.10/tinywebdb-api.php
r1818322 r2282302 9 9 Author: Hong Chen 10 10 Author URI: http://edu2web.com/tinywebdb-api/ 11 Version: 0.2. 911 Version: 0.2.11 12 12 */ 13 13 14 15 14 define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php"); 16 define("TINYWEBDB_VER", "0.2. 9");15 define("TINYWEBDB_VER", "0.2.11"); 17 16 18 17 //***** Hooks ***** … … 22 21 //***** End Hooks ***** 23 22 24 25 23 //***** Installer ***** 26 24 if (is_admin()) { 27 25 include "installer.php"; 28 26 } 29 30 27 31 28 //***** get $request and get_post , then json_encode it ***** … … 40 37 41 38 function wp_tinywebdb_api_query() { 42 43 44 39 require_once dirname(__FILE__) . '/tinywebdb.php'; 45 $tinywebdb = TinyWebDB;40 $tinywebdb = new TinyWebDB(); 46 41 header("HTTP/1.1 200 OK"); 47 42 … … 89 84 90 85 91 92 86 //Just a boring function to insert the menus 93 87 function wp_tinywebdb_api_add_pages() { … … 97 91 98 92 99 100 93 //***** Menu ***** 101 94 if (is_admin()) { 102 95 include "menus.php"; 103 96 } 104 105 97 106 98 … … 116 108 117 109 118 119 110 //***** Get Plugin Location ***** 120 111 function wp_tinywebdb_api_get_plugin_dir($type) { … … 128 119 129 120 130 131 121 //***** Add Item to Favorites Menu ***** 132 122 function wp_tinywebdb_api_add_menu_favorite($actions) { … … 136 126 add_filter('favorite_actions', 'wp_tinywebdb_api_add_menu_favorite'); //Favorites Menu 137 127 138 139 140 128 ?> -
tinywebdb-api/tags/0.2.10/tinywebdb.php
r1769473 r2282302 51 51 52 52 if ( strpos('/'.$request, '/'.$url_trigger.'/') ) { 53 54 $tinywebdb_key = explode($url_trigger.'/', $request); 55 $tinywebdb_key = $tinywebdb_key[1]; 56 $tinywebdb_key = explode('/', $tinywebdb_key); 57 $action = $tinywebdb_key[0]; 58 $action = $wpdb->escape($action); 59 60 return $action; 61 } 62 return "No match!"; 53 $tinywebdb_key = explode($url_trigger.'/', $request); 54 $tinywebdb_key = $tinywebdb_key[1]; 55 $tinywebdb_key = explode('/', $tinywebdb_key); 56 $action = $tinywebdb_key[0]; 57 $action = $wpdb->escape($action); 58 return $action; 59 } 60 return "No match!"; 63 61 } 64 62 -
tinywebdb-api/trunk/menus.php
r1818322 r2282302 95 95 $setting_apikey = get_option("wp_tinywebdb_api_key"); 96 96 97 echo '<form method="post" action="">';98 97 echo '<table class="form-table">'; 99 98 ?> … … 107 106 <th class="manage-column" scope="col">Controller</th> 108 107 <th class="manage-column" scope="col">Description</th> 109 </tr> 110 </thead> 111 <tfoot> 112 <tr> 113 <th class="manage-column check-column" scope="col"></th> 114 <th class="manage-column" scope="col">Controller</th> 115 <th class="manage-column" scope="col">Description</th> 108 <th class="manage-column" scope="col">API</th> 116 109 </tr> 117 110 </tfoot> … … 125 118 <td class="desc"> 126 119 <p>Basic introspection methods</p> 120 </td> 121 <td class="desc"> 127 122 <p><code><a href="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/info/">info</a></code></p> 128 123 </td> … … 136 131 <td class="desc"> 137 132 <p>Get dara from your post by Post ID or Slug </p> 138 <p><code><a href="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/getvalue/">getvalue</a></code></p> 133 </td> 134 <td class="desc"> 135 <form action="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/getvalue" method="post" enctype=application/x-www-form-urlencoded> 136 Tag:<input type="text" name="tag" /> 137 <input type="hidden" name="fmt" value="html"> 138 <input type="submit" value="Get value"> 139 </form> 139 140 </td> 140 141 </tr> … … 148 149 <td class="desc"> 149 150 <p>Store data on a your post by Post ID or Slug </p> 150 <p><code><a href="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/storeavalue/">storeavalue</a></code></p> 151 </td> 152 <td class="desc"> 153 <form action="<?php echo get_option('home') . "/" . $setting_url_trigger ?>/storeavalue" method="post" enctype=application/x-www-form-urlencoded> 154 Tag:<input type="text" name="tag"/> 155 Value:<input type="text" name="value" size="30"/> 156 <input type="hidden" name="fmt" value="html"> 157 <input type="submit" value="Store a value"> 158 </form> 151 159 </td> 152 160 </tbody> … … 157 165 <h3>Address</h3> 158 166 167 <form method="post" action=""> 159 168 <table class="form-table"> 160 169 <tr valign="top"> 161 170 <th scope="row">API base</th> 162 <td><input name="urltrigger" type="text" id="urltrigger" value="<?php echo $setting_url_trigger; ?>" size="50" /><br/>Specify a base URL for TinyWebDB API. For example, using api as your API base URL would enable the following <?php echo get_option('home'); ?>/api/.You can change the <em>api</em> part of your TinyWebDB APIs to something else. Enter without slashes.</td>171 <td><input name="urltrigger" type="text" id="urltrigger" value="<?php echo $setting_url_trigger; ?>" size="50" /><br/>Specify a base URL for TinyWebDB API. For example, using 'api' as your API base URL would enable the following '<?php echo get_option('home'); ?>/api/'. <br>You can change the <em>api</em> part of your TinyWebDB APIs to something else. Enter without slashes.</td> 163 172 </tr> 164 173 165 174 <tr valign="top"> 166 175 <th scope="row">API Key</th> 167 <td><input name="apikey" type="text" id="apikey" value="<?php echo $setting_apikey; ?>" size="50" /><br/>Set api key to protect your TinyWebDB API. Client mast set same api key to Store A Value to your site </td>176 <td><input name="apikey" type="text" id="apikey" value="<?php echo $setting_apikey; ?>" size="50" /><br/>Set api key to protect your TinyWebDB API. Client mast set same api key to Store A Value to your site. (This function no ready)</td> 168 177 </tr> 169 178 … … 176 185 </tr> 177 186 187 </table> 188 <input name="issubmitted" type="hidden" value="yes" /> 189 <p class="submit"><input type="submit" name="Submit" value="Save settings" /></p> 190 </form> 191 178 192 <?php 179 echo '</table>';180 echo '<input name="issubmitted" type="hidden" value="yes" />';181 echo '<p class="submit"><input type="submit" name="Submit" value="Save settings" /></p>';182 echo '</form>';183 193 wp_tinywebdb_api_footer(); 184 194 echo '</div>'; -
tinywebdb-api/trunk/readme.txt
r1818322 r2282302 2 2 3 3 Contributors: chen420 4 Plugin URI: https://github.com/ edu2web/tinywebdb-api4 Plugin URI: https://github.com/TinyWebDB/tinywebdb-api 5 5 Author URI: https://github.com/chen420 6 Document URI: http:// edu2web.com/tinywebdb-api/7 Donate link: http://edu2web.com/tinywebdb-api/donate/6 Document URI: http://api.edu2web.com/tinywebdb-api/ 7 Donate link: http://api.edu2web.com/tinywebdb-api/donate/ 8 8 Tags: appinventor, tinywebdb, api 9 9 Requires at least: 4.0 10 10 Requires PHP: 5.2.4 11 Tested up to: 4.912 Stable tag: 0.2. 911 Tested up to: 5.4 12 Stable tag: 0.2.11 13 13 License: GPLv2 or later 14 14 License URI: http://www.gnu.org/licenses/gpl-2.0.html 15 15 16 16 a AppInventor TinyWebDB API plugin, use you WordPress as a TinyWebDB web service. 17 We also have lso have a TinyWebDB implementation based on PHP and textfile. No database is required. 18 https://github.com/TinyWebDB/tinywebdb-php 17 19 18 20 … … 94 96 Active "Store A Value" and some enhancement. 95 97 98 = 0.2.9 = 99 Active log viewer and some enhancement. 100 101 = 0.2.11 = 102 App PHP7 support. 103 App test form on admin page. 104 96 105 = 1.0.0 = -
tinywebdb-api/trunk/tinywebdb-api.php
r1818322 r2282302 9 9 Author: Hong Chen 10 10 Author URI: http://edu2web.com/tinywebdb-api/ 11 Version: 0.2. 911 Version: 0.2.11 12 12 */ 13 13 14 15 14 define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php"); 16 define("TINYWEBDB_VER", "0.2. 9");15 define("TINYWEBDB_VER", "0.2.11"); 17 16 18 17 //***** Hooks ***** … … 22 21 //***** End Hooks ***** 23 22 24 25 23 //***** Installer ***** 26 24 if (is_admin()) { 27 25 include "installer.php"; 28 26 } 29 30 27 31 28 //***** get $request and get_post , then json_encode it ***** … … 40 37 41 38 function wp_tinywebdb_api_query() { 42 43 44 39 require_once dirname(__FILE__) . '/tinywebdb.php'; 45 $tinywebdb = TinyWebDB;40 $tinywebdb = new TinyWebDB(); 46 41 header("HTTP/1.1 200 OK"); 47 42 … … 89 84 90 85 91 92 86 //Just a boring function to insert the menus 93 87 function wp_tinywebdb_api_add_pages() { … … 97 91 98 92 99 100 93 //***** Menu ***** 101 94 if (is_admin()) { 102 95 include "menus.php"; 103 96 } 104 105 97 106 98 … … 116 108 117 109 118 119 110 //***** Get Plugin Location ***** 120 111 function wp_tinywebdb_api_get_plugin_dir($type) { … … 128 119 129 120 130 131 121 //***** Add Item to Favorites Menu ***** 132 122 function wp_tinywebdb_api_add_menu_favorite($actions) { … … 136 126 add_filter('favorite_actions', 'wp_tinywebdb_api_add_menu_favorite'); //Favorites Menu 137 127 138 139 140 128 ?> -
tinywebdb-api/trunk/tinywebdb.php
r1769473 r2282302 51 51 52 52 if ( strpos('/'.$request, '/'.$url_trigger.'/') ) { 53 54 $tinywebdb_key = explode($url_trigger.'/', $request); 55 $tinywebdb_key = $tinywebdb_key[1]; 56 $tinywebdb_key = explode('/', $tinywebdb_key); 57 $action = $tinywebdb_key[0]; 58 $action = $wpdb->escape($action); 59 60 return $action; 61 } 62 return "No match!"; 53 $tinywebdb_key = explode($url_trigger.'/', $request); 54 $tinywebdb_key = $tinywebdb_key[1]; 55 $tinywebdb_key = explode('/', $tinywebdb_key); 56 $action = $tinywebdb_key[0]; 57 $action = $wpdb->escape($action); 58 return $action; 59 } 60 return "No match!"; 63 61 } 64 62
Note: See TracChangeset
for help on using the changeset viewer.