Beispiel #1
0
 function saveConfig($config)
 {
     if (!is_array($config)) {
         return true;
     }
     $configKeys = array_keys($config);
     $size = sizeof($configKeys);
     for ($index = 0; $index < $size; $index++) {
         if (get_magic_quotes_gpc()) {
             $key = stripslashes($configKeys[$index]);
             $text = stripslashes($config[$configKeys[$index]]);
         } else {
             $key = $configKeys[$index];
             $text = $config[$configKeys[$index]];
         }
         $key = stripslashes($key);
         $key = str_replace("'", "", $key);
         if ($key == 'token_new' && !empty($text)) {
             $key = 'token';
             $this->update('license', '');
         }
         if ($key == 'license1') {
             $text = trim($text);
             $key = 'license';
         }
         if (isset($GLOBALS[JNEWS . $key]) && $GLOBALS[JNEWS . $key] != $text) {
             $this->update($key, $text);
         }
     }
     if (class_exists('jNews_Auto')) {
         jNews_Auto::good();
     }
     return true;
 }
Beispiel #2
0
    static function edit($listEdit, $lists, $show, $html)
    {
        ?>
	<fieldset class="jnewscss">
	<legend><?php 
        echo _JNEWS_AUTO_RESP_OPTION;
        ?>
</legend>
	<table class="jnewstable" cellspacing="1">
		<tbody>
		<tr>
			<td width="185" class="key">
				<span class="editlinktip">
				<?php 
        $tip = _JNEWS_INFO_LIST_FOLLOW_UP;
        $title = _JNEWS_FOLLOW_UP;
        echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
        ?>
				</span>
			</td>
			<td>
				<input type="text" name="follow_up" class="inputbox" size="6" maxlength="10" value="<?php 
        if (isset($listEdit->follow_up)) {
            echo $listEdit->follow_up;
        } else {
            echo '';
        }
        ?>
" />
			<?php 
        if (!jNews_Auto::good()) {
            echo jnews::printM('no', _JNEWS_NOTSO_GOOD_LIC);
            echo _JNEWS_PLEASE_LIC;
        }
        ?>
			</td>
		</tr>
		</tbody>
	</table>
	</fieldset>
	<?php 
    }
Beispiel #3
0
 /** Function for transferring the acajoom license to jnews
 */
 function acaTojnewsLicenseUpd()
 {
     // get acajoom license key
     $query = " SELECT `text` FROM `#__acajoom_xonfig` WHERE `akey` = 'license'";
     $license = jNews_TableUpdate::_getTableQuery($query, $loadAction = 'loadResult');
     if (!empty($license)) {
         // update license
         jNews_Config::insert('license', $license, 0, true);
         // validate
         if (class_exists('jNews_Auto')) {
             jNews_Auto::good();
         }
     } else {
         // no need to update if there are no license to be updated
         return false;
     }
     return true;
 }