Jump to content
Froxlor Forum

julianlampert

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About julianlampert

  • Rank
    Newbie
  1. julianlampert

    PHP Version Switch

    Hi, I've tried to develop a module in which customers can change the PHP configuration for their domain & subdomain. The problem is I am new to froxlor and do not understand the code. My first attempt was: I edited the 'formfields.domain_edit.php' - File for 'customer -> domains' and added the following code: 'section_b' => array( 'title' => $lng['admin']['phpserversettings'], 'image' => 'icons/domain_edit.png', 'fields' => array( 'phpsettingid' => array( 'visible' => (((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) ? true : false), 'label' => $lng['admin']['phpsettings']['title'], 'type' => 'select', 'select_var' => $phpconfigs ) ) ) I copied the code from the admin template. But I don't know how where to add the $phpconfigs, I mean in which block of the file 'customer_domains.php' and how to customize it. I tried this snippet: $phpconfigs = ''; $phpconfigs_result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`"); while ($phpconfigs_row = $phpconfigs_result_stmt->fetch(PDO::FETCH_ASSOC)) { $phpconfigs .= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true); } But I don't know how to fill the $result['phpsettingid'] - Value (the $result - Array). Please can anybody give me a clue where I have to add the code snippets and how froxlor edits values in the database. Thank you very much! Regards, Julian
×