function objectInfo($object_array)
 {
     reset($object_array);
     while (list($key, $value) = each($object_array)) {
         $this->{$key} = owpPrepareInput($value);
     }
 }
require_once OWP_FUNCTIONS_DIR . 'general.php';
require_once OWP_CLASSES_DIR . 'owp_object_info.php';
require_once OWP_CLASSES_DIR . 'owp_split_page_results.php';
require_once OWP_CLASSES_DIR . 'owp_table_block.php';
require_once OWP_CLASSES_DIR . 'owp_text_tool.php';
require_once OWP_CLASSES_DIR . 'owp_box.php';
require_once OWP_CLASSES_DIR . 'owp_message_stack.php';
$messageStack = new messageStack();
if (EMAIL_TRANSPORT == 'sendmail') {
    include OWP_MAILER_DIR . 'class.phpmailer.php';
}
if (EMAIL_TRANSPORT == 'smtp') {
    include OWP_MAILER_DIR . 'class.smtp.php';
}
// user input
if (isset($_POST)) {
    foreach ($_POST as $k => $v) {
        ${$k} = owpPrepareInput($v);
    }
}
// include the who's online functions
require_once OWP_FUNCTIONS_DIR . 'owp_whos_online.php';
opwUpdateWhosOnline();
require_once OWP_CLASSES_DIR . 'owp_breadcrumb.php';
$breadcrumb = new breadcrumb();
$breadcrumb->add(HEADER_TITLE_TOP, owpLink($owpFilename['index']));
// set which precautions should be checked
define('WARN_INSTALL_EXISTENCE', 'true');
define('WARN_CONFIG_WRITEABLE', 'true');
define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
define('WARN_SESSION_AUTO_START', 'true');
echo TABLE_HEADING_LANGUAGE_STATUS;
?>
</td>
               <td class="dataTableHeadingContent" align="right"><?php 
echo TABLE_HEADING_ACTION;
?>
&nbsp;</td>
             </tr>
<?php 
$search = '';
if ($_GET['search'] && owpNotNull($_GET['search'])) {
    $keywords = owpPrepareInput($_GET['search']);
    $search = "where name like '%" . $keywords . "%' or iso_639_2 like '%" . $keywords . "%' or iso_639_1 like '%" . $keywords . "'";
}
if ($_GET['status']) {
    $status = owpPrepareInput($_GET['status']);
    if (!empty($_GET['search'])) {
        $seach .= "and active = '" . $status . "'";
    } else {
        $search = "where active = '" . $status . "'";
    }
}
$languages_query_raw = "select languages_id, name, iso_639_2, iso_639_1, active, sort_order from " . $owpDBTable['languages'] . " " . $search . " order by sort_order";
$languages_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $languages_query_raw, $languages_query_numrows);
$languages_query = $db->Execute($languages_query_raw);
while ($languages = $languages_query->fields) {
    if ((!$_GET['lID'] || @$_GET['lID'] == $languages['languages_id']) && !$lInfo && substr($_GET['action'], 0, 3) != 'new') {
        $lInfo = new objectInfo($languages);
    }
    if (is_object($lInfo) && $languages['languages_id'] == $lInfo->languages_id) {
        echo '                  <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . owpLink($owpFilename['languages'], 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=edit') . '\'">' . "\n";
?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="owp-title"><?php 
echo HEADING_TITLE;
?>
</td>
      </tr>
<?php 
if ($_GET['action'] == 'new') {
    $form_action = 'insert';
    if ($_GET['nID']) {
        $nID = owpPrepareInput($_GET['nID']);
        $form_action = 'update';
        $newsletter_query = $db->Execute("SELECT title, content, module FROM " . $owpDBTable['newsletters'] . " WHERE newsletters_id = '" . owpDBInput($_GET['nID']) . "'");
        $newsletter = $newsletter_query->fields;
        $nInfo = new objectInfo($newsletter);
    } elseif ($_POST) {
        $nInfo = new objectInfo($_POST);
    } else {
        $nInfo = new objectInfo(array());
    }
    $file_extension = '.php';
    $directory_array = array();
    if ($dir = dir(OWP_MODULES_DIR)) {
        while ($file = $dir->read()) {
            if (!is_dir(OWP_MODULES_DIR . $file)) {
                if (substr($file, strrpos($file, '.')) == $file_extension) {