12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- if (!class_exists("plug_usermanager")) {
- class plug_usermanager {
- function plug_usermanager($ns) {
- $this->title = __("plug_usermanager","dagsopt");
- $this->pluginname = $ns->pluginname;
- $this->file = $ns->file;
- $this->ns = $ns;
- }
- function start() {
- // register_setting("section", "demo-file", array(&this,"handle_file_upload"));
-
- }
- function handle_file_upload($option)
- {
- if(!empty($_FILES["demo-file"]["tmp_name"]))
- {
- $urls = wp_handle_upload($_FILES["demo-file"], array('test_form' => FALSE));
- $temp = $urls["url"];
- return $temp;
- }
- return $option;
- }
-
- function help(){
- ?>
- plug_usermanager
- <?php
- }
- function Option($pre){
-
- }
- /*<input id="link_image" value="test">
- <img src="" id="background_image">
- <a id="upload_image_button" href="#"><?php _e('Set image', 'dagsopt'); ?></a>
- */
- function admin_line($pre){
- ?>
- <form action="plug_usermanager_submit" method="POST" accept-charset="utf-8">
- <input type="file" name="filen">
- <input type="Submit" value="Submit">
- </form>
- <?php
- }
- }
- global $plug_usermanager;
- $plug_usermanager = new plug_usermanager($this);
- $this->dagsopt['plug_usermanager'] = $plug_usermanager;
-
- }
|