$duplicate_word_ids = array();
    while ($translation = mysql_fetch_assoc($translations)) {
        if (empty($translation['translation']) && isset($file_system_labels[$translation['word']])) {
            $translation['translation'] = $file_system_labels[$translation['word']];
        }
        if (strlen($translation['translation']) && $translation['translation'] != $translation['word'] && isset($labels[$translation['translation']])) {
            $sql = "SELECT * FROM `" . _DB_PREFIX . "language_word` WHERE `word` = '" . mysql_real_escape_string($translation['translation']) . "'";
            $res = qa($sql);
            if (count($res)) {
                //echo $sql.'<br>';
            }
            foreach ($res as $r) {
                $duplicate_word_ids[$r['language_word_id']] = $translation['translation'];
            }
        }
        if (module_language::ignore_word($translation['word'])) {
            $duplicate_word_ids[$translation['language_word_id']] = $translation['translation'];
        }
    }
    foreach ($duplicate_word_ids as $duplicate_word_id => $tf) {
        $sql = "SELECT * FROM `" . _DB_PREFIX . "language_word` WHERE `language_word_id` = " . (int) $duplicate_word_id;
        $translation = qa1($sql);
        ?>
		        <tr>
		            <td>

		                <?php 
        echo htmlspecialchars($translation['word']);
        ?>
		            </td>
		            <td>
Example #2
0
 public static function is_language_db_enabled()
 {
     if (self::$is_db_enabled === false) {
         if (self::db_table_exists('language') && module_config::c('language_database_enabled', 1)) {
             self::$is_db_enabled = 1;
         } else {
             self::$is_db_enabled = 0;
         }
     }
     return self::$is_db_enabled;
 }
    }
    $fieldset_data['elements']['primary'] = array('title' => 'Primary', 'fields' => array(array('type' => 'check', 'name' => 'customer_primary', 'value' => '1', 'checked' => $primary), _hr('This users details will be used as a primary point of contact for this customer. These details will display in the main customer listing for this customer. Also if you send an invoice or a newsletter to this "customer" then this email address will be used.')));
} else {
    if (isset($show_more_button) && $show_more_button) {
        $fieldset_data['heading']['button'] = array('title' => 'More', 'url' => module_user::link_open_contact($user_id, false));
    }
}
$fieldset_data['elements']['fname'] = array('title' => 'First Name', 'fields' => array(array('type' => 'text', 'name' => 'name', 'value' => $user['name'])));
$fieldset_data['elements']['last_name'] = array('title' => 'Last Name', 'fields' => array(array('type' => 'text', 'name' => 'last_name', 'value' => $user['last_name'])));
$fieldset_data['elements']['email'] = array('title' => 'Email Address', 'fields' => array(array('type' => 'text', 'name' => 'email', 'value' => $user['email'])));
$fieldset_data['elements']['phone'] = array('title' => 'Phone', 'fields' => array(array('type' => 'text', 'name' => 'phone', 'value' => $user['phone'])));
$fieldset_data['elements']['mobile'] = array('title' => 'Mobile', 'fields' => array(array('type' => 'text', 'name' => 'mobile', 'value' => $user['mobile'])));
$fieldset_data['elements']['fax'] = array('title' => 'Fax', 'fields' => array(array('type' => 'text', 'name' => 'fax', 'value' => $user['fax'])));
if (class_exists('module_language', false) && isset($user['language'])) {
    $attr = array();
    foreach (module_language::get_languages_attributes() as $langauge) {
        $attr[$langauge['language_code']] = $langauge['language_name'];
    }
    $fieldset_data['elements']['language'] = array('title' => 'Language', 'fields' => array(array('type' => 'select', 'name' => 'language', 'options' => $attr, 'value' => $user['language'])));
}
if (class_exists('module_extra') && module_extra::is_plugin_enabled() && module_extra::can_i('view', 'Contacts')) {
    $fieldset_data['extra_settings'] = array('owner_table' => 'user', 'owner_key' => 'user_id', 'owner_id' => $user['user_id'], 'layout' => 'table_row', 'allow_new' => module_extra::can_i('create', 'Contacts'), 'allow_edit' => module_extra::can_i('edit', 'Contacts'));
}
echo module_form::generate_fieldset($fieldset_data);
unset($fieldset_data);
?>


	<input type="hidden" name="user_id" value="<?php 
echo $user_id;
?>
Example #4
0
			<thead>
			<tr class="title">
				<th><?php 
    echo _l('Language Code');
    ?>
</th>
				<th><?php 
    echo _l('Language Name');
    ?>
</th>
			</tr>
			</thead>
			<tbody>
			<?php 
    $c = 0;
    foreach (module_language::get_languages_attributes() as $language_code => $language) {
        if (!isset($language['language_id']) || !$language['language_id']) {
            echo "Language {$language_code} failed to update insert into database.. Please report this bug to Support.";
            continue;
        }
        $languages_attributes[$language_code] = $language['language_name'];
        ?>
				<tr class="<?php 
        echo $c++ % 2 ? "odd" : "even";
        ?>
">
					<td class="row_action">
						<a href="<?php 
        echo htmlspecialchars($_SERVER['REQUEST_URI']) . (strpos($_SERVER['REQUEST_URI'], '?') === false ? '?' : '&');
        ?>
language_id=<?php