[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: chora addsite.php,1.5,1.6 deletesite.php,1.4,1.5
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: chora addsite.php,1.5,1.6 deletesite.php,1.4,1.5 editsite.php,1.5,1.6 sites.php,1.9,1.10 |
Date: |
Sun, 28 Apr 2002 15:47:58 -0400 |
Update of /cvsroot/phpgroupware/chora
In directory subversions:/tmp/cvs-serv27558
Modified Files:
addsite.php deletesite.php editsite.php sites.php
Log Message:
Some long overdue formatting and globals
Index: addsite.php
===================================================================
RCS file: /cvsroot/phpgroupware/chora/addsite.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** addsite.php 20 Jun 2001 22:12:43 -0000 1.5
--- addsite.php 28 Apr 2002 19:47:55 -0000 1.6
***************
*** 12,25 ****
/* $Id$ */
! $phpgw_info["flags"]["currentapp"] = 'chora';
! $phpgw_info["flags"]['enable_config_class'] = True;
include('../header.inc.php');
! if(!$phpgw->acl->check('run',1,'admin'))
{
echo lang('access not permitted');
! $phpgw->common->phpgw_footer();
! $phpgw->common->phpgw_exit();
!
}
--- 12,25 ----
/* $Id$ */
! $phpgw_info = array();
! $GLOBALS['phpgw_info']['flags']['currentapp'] = 'chora';
! $GLOBALS['phpgw_info']['flags']['enable_config_class'] = True;
include('../header.inc.php');
! if(!$GLOBALS['phpgw']->acl->check('run',1,'admin'))
{
echo lang('access not permitted');
! $GLOBALS['phpgw']->common->phpgw_footer();
! $GLOBALS['phpgw']->common->phpgw_exit();
}
***************
*** 29,50 ****
$t->set_block('form','edit','edithandle');
! if ($submit)
{
$errorcount = 0;
! $phpgw->db->query("SELECT * FROM phpgw_chora_sites WHERE
name='".$site_name."'");
! if ($phpgw->db->next_record())
{
$error[$errorcount++] = lang('That site name has been
used already !');
}
! if (!$site_name)
{
$error[$errorcount++] = lang('Please enter a name for
that site !');
}
! if (!$error)
{
! if ($is_default == 'on')
{
$default_checked = True;
--- 29,50 ----
$t->set_block('form','edit','edithandle');
! if($submit)
{
$errorcount = 0;
! $GLOBALS['phpgw']->db->query("SELECT * FROM phpgw_chora_sites
WHERE name='".$site_name."'");
! if($GLOBALS['phpgw']->db->next_record())
{
$error[$errorcount++] = lang('That site name has been
used already !');
}
! if(!$site_name)
{
$error[$errorcount++] = lang('Please enter a name for
that site !');
}
! if(!$error)
{
! if($is_default == 'on')
{
$default_checked = True;
***************
*** 55,59 ****
}
! if($default_checked) { $phpgw->db->query("UPDATE
phpgw_chora_sites SET is_default=0"); }
$site_name = addslashes($site_name);
--- 55,62 ----
}
! if($default_checked)
! {
! $GLOBALS['phpgw']->db->query("UPDATE
phpgw_chora_sites SET is_default=0");
! }
$site_name = addslashes($site_name);
***************
*** 62,77 ****
$site_intro = addslashes($site_intro);
! $phpgw->db->query("INSERT INTO phpgw_chora_sites
(name,title,location,intro,is_default) VALUES ("
. "'" . $site_name . "','" .$site_title . "','"
.$site_location . "','" . $site_intro . "'," . $default_checked .")");
}
}
! if ($errorcount) {
$t->set_var('message',$phpgw->common->error_list($error)); }
if (($submit) && (! $error) && (! $errorcount)) {
$t->set_var('message',lang('Repository x has been added !', $site_name)); }
if ((! $submit) && (! $error) && (! $errorcount)) {
$t->set_var('message',''); }
$t->set_var('title_sites',lang('Add CVS Repository'));
! $t->set_var('actionurl',$phpgw->link('/chora/addsite.php'));
! $t->set_var('doneurl',$phpgw->link('/chora/sites.php'));
$t->set_var('hidden_vars','<input type="hidden" name="site_id" value="'
. $site_id . '">');
--- 65,80 ----
$site_intro = addslashes($site_intro);
! $GLOBALS['phpgw']->db->query("INSERT INTO
phpgw_chora_sites (name,title,location,intro,is_default) VALUES ("
. "'" . $site_name . "','" .$site_title . "','"
.$site_location . "','" . $site_intro . "'," . $default_checked .")");
}
}
! if ($errorcount) {
$t->set_var('message',$GLOBALS['phpgw']->common->error_list($error)); }
if (($submit) && (! $error) && (! $errorcount)) {
$t->set_var('message',lang('Repository x has been added !', $site_name)); }
if ((! $submit) && (! $error) && (! $errorcount)) {
$t->set_var('message',''); }
$t->set_var('title_sites',lang('Add CVS Repository'));
! $t->set_var('actionurl',$GLOBALS['phpgw']->link('/chora/addsite.php'));
! $t->set_var('doneurl',$GLOBALS['phpgw']->link('/chora/sites.php'));
$t->set_var('hidden_vars','<input type="hidden" name="site_id" value="'
. $site_id . '">');
***************
*** 87,92 ****
$t->set_var('site_name',$site_name);
$t->set_var('site_title',$site_title);
! $t->set_var('site_location',$phpgw->strip_html($site_location));
! $t->set_var('site_intro',$phpgw->strip_html($sites[0]['intro']));
$t->set_var('edithandle','');
--- 90,95 ----
$t->set_var('site_name',$site_name);
$t->set_var('site_title',$site_title);
!
$t->set_var('site_location',$GLOBALS['phpgw']->strip_html($site_location));
!
$t->set_var('site_intro',$GLOBALS['phpgw']->strip_html($sites[0]['intro']));
$t->set_var('edithandle','');
***************
*** 95,98 ****
$t->pparse('addhandle','add');
! $phpgw->common->phpgw_footer();
?>
--- 98,101 ----
$t->pparse('addhandle','add');
! $GLOBALS['phpgw']->common->phpgw_footer();
?>
Index: deletesite.php
===================================================================
RCS file: /cvsroot/phpgroupware/chora/deletesite.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** deletesite.php 20 Jun 2001 22:12:43 -0000 1.4
--- deletesite.php 28 Apr 2002 19:47:55 -0000 1.5
***************
*** 12,18 ****
/* $Id$ */
! if ($confirm)
{
! $phpgw_info["flags"] = array(
'noheader' => True,
'nonavbar' => True
--- 12,19 ----
/* $Id$ */
! $phpgw_info = array();
! if($confirm)
{
! $GLOBALS['phpgw_info']["flags"] = array(
'noheader' => True,
'nonavbar' => True
***************
*** 20,44 ****
}
! $phpgw_info["flags"]["currentapp"] = 'admin';
! $phpgw_info["flags"]['enable_config_class'] = True;
include('../header.inc.php');
! if(!$phpgw->acl->check('run',1,'admin'))
{
echo lang('access not permitted');
! $phpgw->common->phpgw_footer();
! $phpgw->common->phpgw_exit();
!
}
! if (!$site_id)
{
! Header('Location: ' . $phpgw->link('/chora/sites.php'));
}
! if ($confirm)
{
! $phpgw->db->query("DELETE FROM phpgw_chora_sites WHERE id=" .
$site_id);
! Header('Location: ' .
$phpgw->link('/chora/sites.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
}
else
--- 21,44 ----
}
! $GLOBALS['phpgw_info']['flags']['currentapp'] = 'admin';
! $GLOBALS['phpgw_info']['flags']['enable_config_class'] = True;
include('../header.inc.php');
! if(!$GLOBALS['phpgw']->acl->check('run',1,'admin'))
{
echo lang('access not permitted');
! $GLOBALS['phpgw']->common->phpgw_footer();
! $GLOBALS['phpgw']->common->phpgw_exit();
}
! if(!$site_id)
{
! Header('Location: ' .
$GLOBALS['phpgw']->link('/chora/sites.php'));
}
! if($confirm)
{
! $GLOBALS['phpgw']->db->query("DELETE FROM phpgw_chora_sites
WHERE id=" . $site_id);
! Header('Location: ' .
$GLOBALS['phpgw']->link('/chora/sites.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
}
else
***************
*** 55,64 ****
$t->set_var('messages',lang('Are you sure you want to delete
this repository?'));
! $nolinkf =
$phpgw->link('/chora/sites.php',"site_id=$site_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter");
$nolink = "<a href=\"$nolinkf\">" . lang('No') ."</a>";
$t->set_var('no',$nolink);
! $yeslinkf =
$phpgw->link('/chora/deletesite.php',"site_id=$site_id&confirm=True");
! $yeslinkf = "<FORM method=\"POST\" name=yesbutton
action=\"".$phpgw->link('/chora/deletesite.php') . "\">"
. $hidden_vars
. "<input type=hidden name=site_id value=$site_id>"
--- 55,64 ----
$t->set_var('messages',lang('Are you sure you want to delete
this repository?'));
! $nolinkf =
$GLOBALS['phpgw']->link('/chora/sites.php',"site_id=$site_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter");
$nolink = "<a href=\"$nolinkf\">" . lang('No') ."</a>";
$t->set_var('no',$nolink);
! $yeslinkf =
$GLOBALS['phpgw']->link('/chora/deletesite.php',"site_id=$site_id&confirm=True");
! $yeslinkf = "<FORM method=\"POST\" name=yesbutton
action=\"".$GLOBALS['phpgw']->link('/chora/deletesite.php') . "\">"
. $hidden_vars
. "<input type=hidden name=site_id value=$site_id>"
***************
*** 74,77 ****
}
! $phpgw->common->phpgw_footer();
?>
--- 74,77 ----
}
! $GLOBALS['phpgw']->common->phpgw_footer();
?>
Index: editsite.php
===================================================================
RCS file: /cvsroot/phpgroupware/chora/editsite.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** editsite.php 20 Jun 2001 22:12:43 -0000 1.5
--- editsite.php 28 Apr 2002 19:47:55 -0000 1.6
***************
*** 12,30 ****
/* $Id$ */
! $phpgw_info["flags"]["currentapp"] = 'chora';
! $phpgw_info["flags"]['enable_config_class'] = True;
include('../header.inc.php');
! if(!$phpgw->acl->check('run',1,'admin'))
{
echo lang('access not permitted');
! $phpgw->common->phpgw_footer();
! $phpgw->common->phpgw_exit();
!
}
! if (!$site_id)
{
! Header('Location: ' .
$phpgw->link('/chora/sites.php',"sort=$sort&order=$order&query=$query&start=$start"
. "&filter=$filter"));
}
--- 12,30 ----
/* $Id$ */
! $phpgw_info = array();
! $GLOBALS['phpgw_info']['flags']['currentapp'] = 'chora';
! $GLOBALS['phpgw_info']['flags']['enable_config_class'] = True;
include('../header.inc.php');
! if(!$GLOBALS['phpgw']->acl->check('run',1,'admin'))
{
echo lang('access not permitted');
! $GLOBALS['phpgw']->common->phpgw_footer();
! $GLOBALS['phpgw']->common->phpgw_exit();
}
! if(!$site_id)
{
! Header('Location: ' .
$GLOBALS['phpgw']->link('/chora/sites.php',"sort=$sort&order=$order&query=$query&start=$start"
. "&filter=$filter"));
}
***************
*** 42,53 ****
. "<input type=\"hidden\" name=\"site_id\"
value=\"$site_id\">\n";
! if ($submit)
{
$errorcount = 0;
! if (!$site_name) { $error[$errorcount++] = lang('Please enter a
name for that site!'); }
! $phpgw->db->query("SELECT count(*) from phpgw_chora_sites WHERE
name='$site_name' AND id !='$site_id'");
! $phpgw->db->next_record();
! if ($phpgw->db->f(0) != 0) { $error[$errorcount++] = lang('That
site name has been used already !'); }
$site_name = addslashes($site_name);
--- 42,59 ----
. "<input type=\"hidden\" name=\"site_id\"
value=\"$site_id\">\n";
! if($submit)
{
$errorcount = 0;
! if(!$site_name)
! {
! $error[$errorcount++] = lang('Please enter a name for
that site!');
! }
! $GLOBALS['phpgw']->db->query("SELECT count(*) from
phpgw_chora_sites WHERE name='$site_name' AND id !='$site_id'");
! $GLOBALS['phpgw']->db->next_record();
! if($GLOBALS['phpgw']->db->f(0) != 0)
! {
! $error[$errorcount++] = lang('That site name has been
used already !');
! }
$site_name = addslashes($site_name);
***************
*** 56,60 ****
$site_intro = addslashes($site_intro);
! if ($is_default == 'on')
{
$default_checked = True;
--- 62,66 ----
$site_intro = addslashes($site_intro);
! if($is_default == 'on')
{
$default_checked = True;
***************
*** 65,72 ****
}
! if (! $error)
{
! if($default_checked) { $phpgw->db->query("UPDATE
phpgw_chora_sites SET is_default=0"); }
! $phpgw->db->query("UPDATE phpgw_chora_sites SET"
. " name='" . $site_name
. "',title='" . $site_title
--- 71,81 ----
}
! if(!$error)
{
! if($default_checked)
! {
! $GLOBALS['phpgw']->db->query("UPDATE
phpgw_chora_sites SET is_default=0");
! }
! $GLOBALS['phpgw']->db->query("UPDATE phpgw_chora_sites
SET"
. " name='" . $site_name
. "',title='" . $site_title
***************
*** 78,102 ****
}
! if ($errorcount) {
$t->set_var('message',$phpgw->common->error_list($error)); }
if (($submit) && (! $error) && (! $errorcount)) {
$t->set_var('message',lang("Repository $site_name has been updated !")); }
if ((! $submit) && (! $error) && (! $errorcount)) {
$t->set_var('message',''); }
! $phpgw->db->query("SELECT * FROM phpgw_chora_sites WHERE id=".$site_id);
! while ($phpgw->db->next_record())
{
$sites[] = array(
! 'id' => $phpgw->db->f('id'),
! 'name' => $phpgw->db->f('name'),
! 'location' => $phpgw->db->f('location'),
! 'title' => $phpgw->db->f('title'),
! 'intro' => $phpgw->db->f('intro'),
! 'is_default' => $phpgw->db->f('is_default')
);
}
$t->set_var('title_sites',lang('Edit repository'));
! $t->set_var('actionurl',$phpgw->link('/chora/editsite.php'));
!
$t->set_var('deleteurl',$phpgw->link('/chora/deletesite.php',"site_id=$site_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
!
$t->set_var('doneurl',$phpgw->link('/chora/sites.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$t->set_var('hidden_vars',$hidden_vars);
--- 87,111 ----
}
! if ($errorcount) {
$t->set_var('message',$GLOBALS['phpgw']->common->error_list($error)); }
if (($submit) && (! $error) && (! $errorcount)) {
$t->set_var('message',lang("Repository $site_name has been updated !")); }
if ((! $submit) && (! $error) && (! $errorcount)) {
$t->set_var('message',''); }
! $GLOBALS['phpgw']->db->query("SELECT * FROM phpgw_chora_sites WHERE
id=".$site_id);
! while($GLOBALS['phpgw']->db->next_record())
{
$sites[] = array(
! 'id' => $GLOBALS['phpgw']->db->f('id'),
! 'name' => $GLOBALS['phpgw']->db->f('name'),
! 'location' => $GLOBALS['phpgw']->db->f('location'),
! 'title' => $GLOBALS['phpgw']->db->f('title'),
! 'intro' => $GLOBALS['phpgw']->db->f('intro'),
! 'is_default' => $GLOBALS['phpgw']->db->f('is_default')
);
}
$t->set_var('title_sites',lang('Edit repository'));
! $t->set_var('actionurl',$GLOBALS['phpgw']->link('/chora/editsite.php'));
!
$t->set_var('deleteurl',$GLOBALS['phpgw']->link('/chora/deletesite.php',"site_id=$site_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
!
$t->set_var('doneurl',$GLOBALS['phpgw']->link('/chora/sites.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$t->set_var('hidden_vars',$hidden_vars);
***************
*** 112,121 ****
$site_id = $sites[0]['id'];
! $t->set_var('site_name',$phpgw->strip_html($sites[0]['name']));
! $t->set_var('site_title',$phpgw->strip_html($sites[0]['title']));
! $t->set_var('site_location',$phpgw->strip_html($sites[0]['location']));
! $t->set_var('site_intro',$phpgw->strip_html($sites[0]['intro']));
! if ($sites[0]['is_default'])
{
$t->set_var('is_default',' checked');
--- 121,130 ----
$site_id = $sites[0]['id'];
!
$t->set_var('site_name',$GLOBALS['phpgw']->strip_html($sites[0]['name']));
!
$t->set_var('site_title',$GLOBALS['phpgw']->strip_html($sites[0]['title']));
!
$t->set_var('site_location',$GLOBALS['phpgw']->strip_html($sites[0]['location']));
!
$t->set_var('site_intro',$GLOBALS['phpgw']->strip_html($sites[0]['intro']));
! if($sites[0]['is_default'])
{
$t->set_var('is_default',' checked');
***************
*** 132,135 ****
$t->pparse('edithandle','edit');
! $phpgw->common->phpgw_footer();
?>
--- 141,144 ----
$t->pparse('edithandle','edit');
! $GLOBALS['phpgw']->common->phpgw_footer();
?>
Index: sites.php
===================================================================
RCS file: /cvsroot/phpgroupware/chora/sites.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** sites.php 25 Jul 2001 23:34:57 -0000 1.9
--- sites.php 28 Apr 2002 19:47:55 -0000 1.10
***************
*** 12,28 ****
/* $Id$ */
! $phpgw_info["flags"] = array(
'currentapp' => 'chora',
'enable_config_class' => True,
! 'enable_nextmatchs_class' => True);
!
include('../header.inc.php');
! if(!$phpgw->acl->check('run',1,'admin'))
{
echo lang('access not permitted');
! $phpgw->common->phpgw_footer();
! $phpgw->common->phpgw_exit();
!
}
--- 12,28 ----
/* $Id$ */
! $phpgw_info = array();
! $GLOBALS['phpgw_info']['flags'] = array(
'currentapp' => 'chora',
'enable_config_class' => True,
! 'enable_nextmatchs_class' => True
! );
include('../header.inc.php');
! if(!$GLOBALS['phpgw']->acl->check('run',1,'admin'))
{
echo lang('access not permitted');
! $GLOBALS['phpgw']->common->phpgw_footer();
! $GLOBALS['phpgw']->common->phpgw_exit();
}
***************
*** 31,54 ****
$t->set_block('site_list_t','site_list','list');
! $common_hidden_vars = "<input type=\"hidden\" name=\"sort\"
value=\"$sort\">\n"
! . "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
! . "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
! . "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
! . "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
$t->set_var('lang_action',lang('Repository List'));
! $t->set_var('add_action',$phpgw->link('/chora/addsite.php'));
$t->set_var('lang_add',lang('Add'));
$t->set_var('title_sites',lang('CVS Repositories'));
$t->set_var('lang_search',lang('Search'));
! $t->set_var('actionurl',$phpgw->link('/chora/sites.php'));
$t->set_var('lang_done',lang('Done'));
! $t->set_var('doneurl',$phpgw->link('/admin/index.php'));
! if (!$start) { $start = 0; }
! if($phpgw_info["user"]["preferences"]["common"]["maxmatchs"] &&
$phpgw_info["user"]["preferences"]["common"]["maxmatchs"] > 0)
{
! $limit =
$phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
}
else
--- 31,59 ----
$t->set_block('site_list_t','site_list','list');
! $common_hidden_vars =
! '<input type="hidden" name="sort" value="' . $sort . '">'
. "\n"
! . '<input type="hidden" name="order" value="' . $order . '">'
. "\n"
! . '<input type="hidden" name="query" value="' . $query . '">'
. "\n"
! . '<input type="hidden" name="start" value="' . $start . '">'
. "\n"
! . '<input type="hidden" name="filter" value="' . $filter . '">'
. "\n";
$t->set_var('lang_action',lang('Repository List'));
! $t->set_var('add_action',$GLOBALS['phpgw']->link('/chora/addsite.php'));
$t->set_var('lang_add',lang('Add'));
$t->set_var('title_sites',lang('CVS Repositories'));
$t->set_var('lang_search',lang('Search'));
! $t->set_var('actionurl',$GLOBALS['phpgw']->link('/chora/sites.php'));
$t->set_var('lang_done',lang('Done'));
! $t->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
! if(!$start)
! {
! $start = 0;
! }
! if($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']
&&
!
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
{
! $limit =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
}
else
***************
*** 57,132 ****
}
! if (!$sort) { $sort = "ASC"; }
! if ($order) { $ordermethod = "order by $order $sort "; }
! else { $ordermethod = " order by name asc "; }
! if ($query)
{
! $querymethod = " WHERE name like '%$query%' OR title like
'%$query%'";
}
! $db2 = $phpgw->db;
$sql = "SELECT * FROM phpgw_chora_sites $querymethod $ordermethod";
$db2->query($sql,__LINE__,__FILE__);
$total_records = $db2->num_rows();
! $phpgw->db->limit_query($sql,$start,__LINE__,__FILE__);
! while ($phpgw->db->next_record())
{
$sites[] = array(
! 'id' => $phpgw->db->f('id'),
! 'name' => $phpgw->db->f('name'),
! 'location' => $phpgw->db->f('location'),
! 'title' => $phpgw->db->f('title'),
! 'is_default' => $phpgw->db->f('is_default')
);
}
!
! //--------------------------------- nextmatch
--------------------------------------------
!
! $left =
$phpgw->nextmatchs->left('/chora/sites.php',$start,$total_records);
! $right =
$phpgw->nextmatchs->right('/chora/sites.php',$start,$total_records);
$t->set_var('left',$left);
$t->set_var('right',$right);
! if ($total_records > $limit)
{
! $t->set_var('lang_showing',lang("showing x - x of x",($start +
1),($start + $limit),$total_records));
}
else
{
! $t->set_var('lang_showing',lang("showing x",$total_records));
}
! // ------------------------------ end nextmatch
------------------------------------------
!
! //------------------- list header variable template-declarations
-------------------------
!
! $t->set_var('th_bg',$phpgw_info["theme"][th_bg]);
!
$t->set_var('sort_name',$phpgw->nextmatchs->show_sort_order($sort,'name',$order,'/chora/sites.php',lang('Name')));
!
$t->set_var('sort_title',$phpgw->nextmatchs->show_sort_order($sort,'title',$order,'/chora/sites.php',lang('Title')));
$t->set_var('lang_default',lang('Default'));
$t->set_var('lang_edit',lang('Edit'));
$t->set_var('lang_delete',lang('Delete'));
! // -------------------------- end header declaration
--------------------------------------
!
! for ($i=0;$i<count($sites);$i++)
{
! $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$t->set_var(tr_color,$tr_color);
$site_id = $sites[$i]['id'];
$is_default = $sites[$i]['is_default'];
! $site_name = $phpgw->strip_html($sites[$i]['name']);
! $site_title = $phpgw->strip_html($sites[$i]['title']);
! if (! $site_title) { $site_title= ' '; }
! //-------------------------- template declaration for list records
---------------------------
$t->set_var(array(
'site_name' => $site_name,
'site_title' => $site_title
));
! if ($is_default)
{
$t->set_var('is_default',lang('Yes'));
--- 62,144 ----
}
! if(!$sort)
! {
! $sort = 'ASC';
! }
! if($order)
! {
! $ordermethod = "ORDER BY $order $sort ";
! }
! else
! {
! $ordermethod = ' ORDER BY name ASC ';
! }
! if($query)
{
! $querymethod = " WHERE name LIKE '%$query%' OR title LIKE
'%$query%'";
}
! $db2 = $GLOBALS['phpgw']->db;
$sql = "SELECT * FROM phpgw_chora_sites $querymethod $ordermethod";
$db2->query($sql,__LINE__,__FILE__);
$total_records = $db2->num_rows();
! $GLOBALS['phpgw']->db->limit_query($sql,$start,__LINE__,__FILE__);
! while($GLOBALS['phpgw']->db->next_record())
{
$sites[] = array(
! 'id' => $GLOBALS['phpgw']->db->f('id'),
! 'name' => $GLOBALS['phpgw']->db->f('name'),
! 'location' => $GLOBALS['phpgw']->db->f('location'),
! 'title' => $GLOBALS['phpgw']->db->f('title'),
! 'is_default' => $GLOBALS['phpgw']->db->f('is_default')
);
}
! //--------------------------------- nextmatch
--------------------------------------------
! $left =
$GLOBALS['phpgw']->nextmatchs->left('/chora/sites.php',$start,$total_records);
! $right =
$GLOBALS['phpgw']->nextmatchs->right('/chora/sites.php',$start,$total_records);
$t->set_var('left',$left);
$t->set_var('right',$right);
! if($total_records > $limit)
{
! $t->set_var('lang_showing',lang('showing x - x of x',($start +
1),($start + $limit),$total_records));
}
else
{
! $t->set_var('lang_showing',lang('showing x',$total_records));
}
+ // ------------------------------ end nextmatch
------------------------------------------
! //------------------- list header variable template-declarations
-------------------------
! $t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$t->set_var('sort_name',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'name',$order,'/chora/sites.php',lang('Name')));
!
$t->set_var('sort_title',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'title',$order,'/chora/sites.php',lang('Title')));
$t->set_var('lang_default',lang('Default'));
$t->set_var('lang_edit',lang('Edit'));
$t->set_var('lang_delete',lang('Delete'));
+ // -------------------------- end header declaration
--------------------------------------
! for($i=0;$i<count($sites);$i++)
{
! $tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$t->set_var(tr_color,$tr_color);
$site_id = $sites[$i]['id'];
$is_default = $sites[$i]['is_default'];
! $site_name = $GLOBALS['phpgw']->strip_html($sites[$i]['name']);
! $site_title =
$GLOBALS['phpgw']->strip_html($sites[$i]['title']);
! if(!$site_title)
! {
! $site_title= ' ';
! }
+ //-------------------------- template declaration for list
records ---------------------------
$t->set_var(array(
'site_name' => $site_name,
'site_title' => $site_title
));
! if($is_default)
{
$t->set_var('is_default',lang('Yes'));
***************
*** 137,144 ****
}
!
$t->set_var('edit',$phpgw->link('/chora/editsite.php',"site_id=$site_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$t->set_var('lang_edit_entry',lang('Edit'));
!
$t->set_var('delete',$phpgw->link('/chora/deletesite.php',"site_id=$site_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$t->set_var('lang_delete_entry',lang('Delete'));
$t->parse('list','site_list',True);
--- 149,156 ----
}
!
$t->set_var('edit',$GLOBALS['phpgw']->link('/chora/editsite.php',"site_id=$site_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$t->set_var('lang_edit_entry',lang('Edit'));
!
$t->set_var('delete',$GLOBALS['phpgw']->link('/chora/deletesite.php',"site_id=$site_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$t->set_var('lang_delete_entry',lang('Delete'));
$t->parse('list','site_list',True);
***************
*** 149,152 ****
$t->p('out');
! $phpgw->common->phpgw_footer();
?>
--- 161,164 ----
$t->p('out');
! $GLOBALS['phpgw']->common->phpgw_footer();
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: chora addsite.php,1.5,1.6 deletesite.php,1.4,1.5 editsite.php,1.5,1.6 sites.php,1.9,1.10,
Miles Lott <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: chora/inc class.cvslib.inc.php,1.7,1.8 class.cvslib_log.inc.php,1.1,1.2
- Next by Date:
[Phpgroupware-cvs] CVS: chora annotate.php,1.5,1.6 checkout.php,1.6,1.7 cvs.php,1.13,1.14 diff.php,1.8,1.9 history.php,1.5,1.6 index.php,1.7,1.8
- Previous by thread:
[Phpgroupware-cvs] CVS: chora/inc class.cvslib.inc.php,1.7,1.8 class.cvslib_log.inc.php,1.1,1.2
- Next by thread:
[Phpgroupware-cvs] CVS: chora annotate.php,1.5,1.6 checkout.php,1.6,1.7 cvs.php,1.13,1.14 diff.php,1.8,1.9 history.php,1.5,1.6 index.php,1.7,1.8
- Index(es):