X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=blobdiff_plain;ds=inline;f=inc%2Fclass.eq.inc.php;h=d6bf500688d66b88a3a558d35284e0b65ff62fea;hb=e5ddee51384dd75fd9611897ce92cb4e76e37952;hp=b1dbb23a16972777e4cf215dba8e16f1032f7eb0;hpb=7af932f11f7025c37945987840922f1786c4de5c;p=eq%2F.git
diff --git a/inc/class.eq.inc.php b/inc/class.eq.inc.php
index b1dbb23..d6bf500 100644
--- a/inc/class.eq.inc.php
+++ b/inc/class.eq.inc.php
@@ -25,6 +25,8 @@ class eq
var $default_att_num_months;
var $current_year;
var $current_month;
+ var $upload_target_path;
+ var $script_path;
var $public_functions = array
(
@@ -41,7 +43,8 @@ class eq
'att_view' => True,
'att_update' => True,
'dir_view' => True,
- 'org_view' => True
+ 'org_view' => True,
+ 'admin' => True
);
function eq()
@@ -50,6 +53,8 @@ class eq
$this->default_ppi_num_months = 3;
$this->default_ppi_num_years = 0;
$this->default_att_num_months = 3;
+ $this->upload_target_path = "/home/users/eqpres/eq_data/";
+ $this->script_path = "/usr/share/phpgroupware/eq/";
$this->db = $GLOBALS['phpgw']->db;
$this->db2 = $this->db;
@@ -121,6 +126,9 @@ class eq
$link_data['menuaction'] = 'eq.eq.org_view';
$this->t->set_var('link_org',$GLOBALS['phpgw']->link('/eq/index.php',$link_data));
$this->t->set_var('lang_org','Callings');
+ $link_data['menuaction'] = 'eq.eq.admin';
+ $this->t->set_var('link_admin',$GLOBALS['phpgw']->link('/eq/index.php',$link_data));
+ $this->t->set_var('lang_admin','Admin');
$this->t->pparse('out','eq_header');
}
@@ -1851,6 +1859,123 @@ class eq
$this->t->pfp('out','org_view_t');
$this->save_sessiondata();
}
+
+ function admin()
+ {
+ $this->t->set_file(array('admin_t' => 'admin.tpl'));
+ $this->t->set_block('admin_t','upload','uploadhandle');
+ $this->t->set_block('admin_t','admin','adminhandle');
+ $this->t->set_block('admin_t','cmd','cmdhandle');
+
+ $this->t->set_var('upload_action',$GLOBALS['phpgw']->link('/eq/index.php','menuaction=eq.eq.admin&action=upload'));
+
+ $action = get_var('action',array('GET','POST'));
+
+ $this->t->pfp('out','admin_t');
+
+ if($action == 'upload')
+ {
+ $target_path = $this->upload_target_path . basename( $_FILES['uploadedfile']['name']);
+
+ if(($_FILES['uploadedfile']['type'] == "application/zip") &&
+ (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path))) {
+ $uploadstatus = "The following file was uploaded successfully:
";
+ $uploadstatus.= "Filename : " . $_FILES['uploadedfile']['name'] . "
";
+ $uploadstatus.= "Type : " . $_FILES['uploadedfile']['type'] . "
";
+ $uploadstatus.= "Size : " . $_FILES['uploadedfile']['size'] . "
";
+ $this->t->set_var('uploadstatus',$uploadstatus);
+ $this->t->pfp('uploadhandle','upload');
+ $this->t->set_var('uploadhandle','');
+ print "
\n"; + + # make a directory for this data to be stored in + $date="data_" . date("Y_m_d"); + $data_dir = $this->upload_target_path . $date; + print "-> Making the data directory: $date |