echo "</label>"; echo "<label for='attribute' class='attributes'> {$row['0']}</label>"; echo "<input type='hidden' name='editValues" . $editCounter . "[]' value='{$row['5']}__{$row['0']}' />"; if ($configValues['CONFIG_IFACE_PASSWORD_HIDDEN'] == "yes" and preg_match("/.*-Password/", $row[0])) { echo "<input type='password' value='{$row['2']}' name='editValues" . $editCounter . "[]' style='width: 115px' />"; echo " "; echo "<select name='editValues" . $editCounter . "[]' style='width: 45px' class='form'>"; echo "<option value='{$row['1']}'>{$row['1']}</option>"; drawOptions(); echo "</select>"; } else { echo "<input value='{$row['2']}' name='editValues" . $editCounter . "[]' style='width: 115px' />"; echo " "; echo "<select name='editValues" . $editCounter . "[]' style='width: 45px' class='form'>"; echo "<option value='{$row['1']}'>{$row['1']}</option>"; drawOptions(); echo "</select>"; } echo "<input type='hidden' name='editValues" . $editCounter . "[]' value='radreply' style='width: 90px'>"; $editCounter++; // we increment the counter for the html elements of the edit attributes if (!$row[3]) { $row[3] = "unavailable"; } if (!$row[4]) { $row[4] = "unavailable"; } printq("\n\t\t\t<img src='images/icons/comment.png' alt='Tip' border='0' onClick=\"javascript:toggleShowDiv('{$row['0']}Tooltip')\" />\n\t\t\t<br/>\n\t <div id='{$row['0']}Tooltip' style='display:none;visibility:visible' class='ToolTip2'>\n\t \n\t\t\t\t\t<i><b>Type:</b> {$row['3']}</i><br/>\n\t\t\t\t \n\t\t\t\t\t<i><b>Tooltip Description:</b> {$row['4']}</i><br/>\n\t\t\t\t<br/>\n\t </div>\n\t\t"); } ?> <br/><br/>
$message = $app['translator']->trans("You need to check your server settings."); $app['session']->getFlashBag()->add('error', $message); } $form = $builder->getForm(); //$req = display_requirements($app, 'new'); if (phpversion() < REQUIRED_PHP_VERSION) { $phpError = '<strong><font color="red">' . translate('PHPVersionError') . '</font></strong>'; } else { $phpError = '<strong><font color="green">' . translate('PHPVersionOK') . ' ' . phpversion() . '</font></strong>'; } if ('POST' == $request->getMethod()) { $url = $app['url_generator']->generate('check-database'); return $app->redirect($url); } $requirements = drawRequirements($app['translator']); $options = drawOptions($app['translator']); $permissions = drawPermissionsSettings($app); return $app['twig']->render('requirements.tpl', array('form' => $form->createView(), 'required_php_version' => REQUIRED_PHP_VERSION, 'required_php_version_validation' => phpversion() < REQUIRED_PHP_VERSION, 'php_version' => phpversion(), 'requirements' => $requirements, 'options' => $options, 'permissions' => $permissions, 'php_error' => $phpError, 'allow_to_continue' => $allowedToContinue)); })->bind('requirements'); $app->match('/check-database', function () use($app) { /** @var Request $request */ $request = $app['request']; $command = $app['console']->get('chamilo:install'); $data = $command->getDatabaseSettingsParams(); $builder = $app['form.factory']->createBuilder('form'); foreach ($data as $key => $value) { $value['attributes'] = isset($value['attributes']) && is_array($value['attributes']) ? $value['attributes'] : array(); $builder->add($key, $value['type'], $value['attributes']); } $builder->add('check', 'submit', array('attr' => array('class' => 'btn'))); $form = $builder->getForm();