I hid the tables easily enough. But now when i try to edit or add a record it shows me this error.
Warning: Cannot modify header information - headers already sent by (output started at /var/www/Craigleith/conf/ApplicationDelegate.php:86) in /var/www/dataface/actions/new.php on line 147
This error i think refers the addition of the message at the top of the page about "Entry saved" or "Entry edited". I do not know what part of this my new ApplicationDelegate.php it is reffering to because it shows as the line number as the end of the code. So I don't know where I screwed up the headers.
- Code: Select all
getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::READ_ONLY();
$role = $user->val('role');
if ( isAdmin() ){
return Dataface_PermissionsTool::ALL();
}elseif ( $role == 'EDIT'){
return Dataface_PermissionsTool::getRolePermissions(EDIT);
}else{
return Dataface_PermissionsTool::READ_ONLY();
}
}
function block__custom_stylesheets(){
echo '';
}
function block__after_application_menu(){
$categories = $this->getCategoriesMenuOptions();
df_display(array('categories'=>&$categories), 'categories_menu.html');
}
function block__before_main_column(){
if ( isAdmin() ) {
$sql = "select sum(bid_amount) from bids b where not exists ( select bid_id from bids b2 where b2.product_id=b.product_id and b2.bid_amount > b.bid_amount) and exists ( select product_id from products p where p.product_id=b.product_id)";
$res = mysql_query($sql, df_db());
list($amt) = mysql_fetch_row($res);
echo "Total Bids Currently: \$".number_format($amt,2).'';
}
}
function getCategoriesMenuOptions(){
$sql = "select p.product_id, pc.category_id, pc.category_name, count(*) as num from products p inner join product_categories pc on p.product_categories rlike concat('[[:<:]]',pc.category_id,'[[:>:]]') group by pc.category_id";
$res = mysql_query($sql, df_db());
$out = array();
while ( $row = mysql_fetch_assoc($res) ) $out[] = $row;
return $out;
}
function getPreferences()
{
$app =& Dataface_Application::getInstance();
$query =& $app->getQuery();
$tables =& $app->_conf['_tables'];
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) {
return array(
'show_tables_menu'=>0,
'show_table_tabs'=>0,
'show_record_tree'=>0,
'show_record_tabs'=>0,
'show_result_controller'=>0);
}
$role = $user->val('role');
if ( $query['-table'] == 'products' and !isset($query['-sort']) ){
$query['-sort'] = 'product_categories asc';
}
closeAuctions();
if ( $role == 'EDIT' ){
unset($tables['bids'],$tables['users'],$tables['fundraiser_information']);
}
if ( $role == "ADMIN" or $role == 'EDIT' ){
return array('show_record_tree'=>0);
}else{
return array(
'show_tables_menu'=>0,
'show_table_tabs'=>0,
'show_record_tree'=>0,
'show_record_tabs'=>0,
'show_result_controller'=>0);
}
}
}
?>
Any help would be appricated.
Also is there a search feature in the phpBB that I cannot find?