Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

M

Marc

@Marc
Unfollow Follow
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Fop 2.11 - Visual Phonebook
    M Marc
    Support

    That worked perfectly. Thanks a lot. 😄


  • Fop 2.11 - Visual Phonebook
    M Marc
    Support

    Hey all,

    Hopefully this will be an easy one...when I open the phonebook I am greeted with this:

    "yes") { die("no way"); } if($context=="") { $addcontext=""; } else { $addcontext="${context}_"; } // Sanitize Input $addcontext = ereg_replace("\.[\.]+", "", $addcontext); $addcontext = ereg_replace("^[\/]+", "", $addcontext); $addcontext = ereg_replace("^[A-Za-z][:\|][\/]?", "", $addcontext); $extension = ereg_replace("'", "", $extension ); $extension = ereg_replace("\"", "", $extension ); $extension = ereg_replace(";", "", $extension ); $grid = new dbgrid($db); $grid->set_table('visual_phonebook'); //$grid->set_caption(trans('Manage Phonebook')); $grid->salt("dldli3ks"); $grid->hide_field('id'); $grid->set_per_page(5); $grid->set_condition("context='$context' AND (owner='$extension' OR (owner<>'$extension' AND private='no'))"); $grid->set_default_values("context",$context); $grid->set_default_values("owner",$extension); $grid->set_input_type("context","hidden"); $grid->set_input_type("owner","hidden"); $grid->no_edit_field("context"); $grid->no_edit_field("owner"); $grid->hide_field('context'); $grid->hide_field('owner'); $grid->edit_field_condition("private",'owner','=',$extension); $fieldname = Array(); $fieldname[]=trans('First Name'); $fieldname[]=trans('Last Name'); $fieldname[]=trans('Company'); $fieldname[]=trans('Phone 1'); $fieldname[]=trans('Phone 2'); $fieldname[]=trans('Private'); $fieldname[]=trans('Picture'); //$grid->set_fields ( "id,firstname,lastname,company,phone1,phone2,owner,private,picture"); $grid->set_display_name( array('firstname','lastname','company','phone1','phone2','private','picture'), $fieldname); $grid->allow_view(true); $grid->allow_edit(true); $grid->allow_delete(true); $grid->allow_add(true); $grid->allow_export(true); $grid->allow_import(true); $grid->allow_search(true); $grid->set_search_fields(array('firstname','lastname','company','phone1','phone2')); $grid->set_input_type('picture','img'); //$grid->set_input_type('owner','select',array($extension,'')); $grid->force_import_field("context",$context); $grid->force_import_field("owner",$extension); $grid->add_display_filter('picture','display_image'); //$grid->add_display_filter('owner','display_private'); //$grid->add_edit_filter('owner','display_private'); $grid->set_user_directory('./uploads/'.$addcontext); //$grid->add_validation_type('email','email'); $grid->show_grid(); function display_image($img) { global $addcontext; if(is_file("./uploads/${addcontext}$img")) { return ""; } else { return "n/a"; } } function display_private($owner) { if($owner=="") { return trans('no'); } else { return trans('yes'); } } ?>
    

    Cannot for the life of me work this out. I have put a fresh copy of the html folder up on the server in the hopes that this would fix it however it still shows this message.

    Server is running the following versions of PHP

    PHP Version 5.3.2
    

    This is on a CentOS 5.3 server and it is connecting to a MySQL server on another box.

    Database has been added correctly and the users configured.

  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups