コード例 #1
0
ファイル: popup.php プロジェクト: WhisperingTree/etagerca
global $cookie, $link;
$module = new blockadvfooter();
if (empty($link)) {
    $link = new Link();
}
$adminfolder = $module->getFolderAdmin();
$id_lang = Tools::getValue('id_lang');
if (Tools::getValue('secure_key') != $module->secure_key) {
    die('Secure key is invalid.');
}
?>
<html>
	<head>
		<title><?php 
echo $module->l('Pop up');
?>
</title>
		<link href="<?php 
echo __PS_BASE_URI__;
?>
css/admin.css"  type="text/css" rel="stylesheet"/>
		<style>
			body{height:100%;background-color: #FFFFFF;}
			#container{height:100%}
			#content{height:90%;border: none;padding: 0px;}
		</style>
		<script src="<?php 
echo _MODULE_DIR_ . $module->name;
?>
/assets/admin/jquery-1.4.4.min.js" type="text/javascript"></script>	
コード例 #2
0
ファイル: ajax.php プロジェクト: WhisperingTree/etagerca
			UPDATE `' . _DB_PREFIX_ . 'loffc_block_item` 
			SET `position` = ' . (int) $pos . ' 
			WHERE `id_loffc_block_item` = ' . (int) $ids[2] . ' AND `id_loffc_block` = ' . (int) $ids[1]);
            $pos++;
        }
    }
}
if (isset($_GET['lofajax']) && $_GET['task'] == 'deleteItem') {
    $json_data = array();
    $json_data['result'] = 1;
    if ($table = Tools::getValue('class_tr')) {
        $ids = explode('_', $table);
        if (Validate::isLoadedObject($obj = new LofItem($ids[2]))) {
            if (!$obj->delete()) {
                $json_data['result'] = 0;
                $json_data['error'] = $module->l('can\'t delete');
            }
        } else {
            $json_data['result'] = 0;
            $json_data['error'] = $module->l('can\'t create object');
        }
    }
    die(json_encode($json_data));
}
if (isset($_GET['lofajax']) && $_GET['task'] == 'updateBlock') {
    $json_data = array();
    $json_data['result'] = 1;
    if (Validate::isLoadedObject($obj = new LofBlock(Tools::getValue('id_loffc_block')))) {
        $errors = array();
        $titles = array();
        foreach ($module->_languages as $language) {