当前位置: 首页>>代码示例>>PHP>>正文


PHP Modules::delete_module方法代码示例

本文整理汇总了PHP中Modules::delete_module方法的典型用法代码示例。如果您正苦于以下问题:PHP Modules::delete_module方法的具体用法?PHP Modules::delete_module怎么用?PHP Modules::delete_module使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Modules的用法示例。


在下文中一共展示了Modules::delete_module方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: administrator

    public function administrator()
    {
        global $Modules, $login;
        echo '<h1>';
        echo get_class($this);
        if ($login == 'aboservice') {
            echo '<button type="button" id="delete_module" href="' . tep_href_link('checkout.php', 'module=' . $_GET['module']) . '&action=delete_module" class="btn btn-danger pull-right">' . Translate('Verwijder module') . '</button>';
            echo '<button type="button" id="add_new" class="btn btn-primary pull-right" style="margin-right:5px;">' . Translate('Voeg een veld toe') . '</button>';
        }
        echo '</h1>';
        echo '<hr />';
        if (isset($_POST['action']) && $_POST['action'] == 'save') {
            /********************/
            /*  Save changes    */
            /********************/
            unset($_POST['action']);
            $db_array = array();
            foreach ($_POST as $key => $data) {
                foreach ($data as $id => $value) {
                    $db_array[$id][$key] = $value;
                }
            }
            foreach ($db_array as $id => $data) {
                tep_db_perform('checkout_' . get_class($this), $data, 'update', 'id="' . $id . '"');
            }
            $this->update_config();
        } else {
            if (isset($_POST['action']) && $_POST['action'] == 'create') {
                /********************/
                /*  Create field    */
                /********************/
                unset($_POST['action']);
                tep_db_perform('checkout_' . get_class($this), $_POST, 'insert');
                $this->update_config();
            } else {
                if (isset($_GET['action']) && $_GET['action'] == 'delete') {
                    /********************/
                    /*  Delete field    */
                    /********************/
                    unset($_GET['action']);
                    tep_db_query('DELETE FROM checkout_' . get_class($this) . ' WHERE id = "' . $_GET['id'] . '"');
                    unset($_GET['id']);
                    $this->update_config();
                } else {
                    if (isset($_GET['action']) && $_GET['action'] == 'delete_module') {
                        /********************/
                        /*  Delete module   */
                        /********************/
                        unset($_GET['action']);
                        parent::delete_module(get_class($this));
                    }
                }
            }
        }
        ?>
		<form name="<?php 
        echo get_class($this);
        ?>
" class="form-horizontal"
		      action="<?php 
        echo tep_href_link('checkout.php', 'module=' . $_GET['module']);
        ?>
" method="post">
			<input type="hidden" name="action" value="save"/>
			<table class="table table-striped table-bordered">
				<thead>
				<tr>
					<th><?php 
        echo Translate('Naam');
        ?>
</th>
					<th><?php 
        echo Translate('Type');
        ?>
</th>
					<th><?php 
        echo Translate('Input type');
        ?>
</th>
					<th><?php 
        echo Translate('Status');
        ?>
</th>
					<th><?php 
        echo Translate('Block');
        ?>
</th>
					<th><?php 
        echo Translate('Label');
        ?>
</th>
					<th><?php 
        echo Translate('Database value');
        ?>
</th>
					<th><?php 
        echo Translate('Regular expression');
        ?>
</th>
					<th><?php 
//.........这里部分代码省略.........
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:101,代码来源:Customers_info_module.php

示例2: administrator

    public function administrator()
    {
        global $Modules, $login;
        echo '<h1>';
        echo get_class($this);
        if ($login == 'aboservice') {
            echo '<button type="button" id="delete_module" href="' . tep_href_link('checkout.php', 'module=' . $_GET['module']) . '&action=delete_module" class="btn btn-danger pull-right">' . Translate('Verwijder module') . '</button>';
        }
        echo '<button type="button" id="add_new" class="btn btn-primary pull-right" style="margin-right:5px;">' . Translate('Voeg een instantie toe') . '</button>';
        echo '</h1>';
        echo '<hr />';
        if (isset($_POST['action']) && $_POST['action'] == 'save') {
            if (isset($_POST['delete'])) {
                /********************/
                /*	Delete instance	*/
                /********************/
                tep_db_query('DELETE FROM checkout_' . get_class($this) . ' WHERE id = "' . $_POST['delete'] . '"');
            } else {
                /********************/
                /*	Save changes	*/
                /********************/
                $instances = array();
                unset($_POST['action']);
                foreach ($_POST as $key => $data) {
                    foreach ($data as $id => $value) {
                        if ($key == 'zone') {
                            if (isset($value['*'])) {
                                $instances[$id][$key] = '*';
                            } else {
                                $instances[$id][$key] = implode(';', $value);
                            }
                        } else {
                            $instances[$id][$key] = $value;
                        }
                    }
                }
                foreach ($instances as $id => $data) {
                    if (isset($this->instances[get_class($this) . '_' . $id])) {
                        tep_db_perform('checkout_' . get_class($this), $data, 'update', 'id="' . $id . '"');
                    } else {
                        $data['id'] = $id;
                        tep_db_perform('checkout_' . get_class($this), $data, 'insert');
                    }
                }
            }
            $this->update_instances();
        } else {
            if (isset($_GET['action']) && $_GET['action'] == 'delete_module') {
                /********************/
                /*	Delete module	*/
                /********************/
                unset($_GET['action']);
                parent::delete_module(get_class($this));
            }
        }
        foreach ($this->instances as $instance => $instance_data) {
            ?>
		<form name="<?php 
            echo $instance;
            ?>
" class="form-horizontal well" action="<?php 
            echo tep_href_link('checkout.php', 'module=' . $_GET['module']);
            ?>
" method="post">
			<input type="hidden" name="action" value="save" />
			<fieldset>
			<legend>
				<?php 
            echo $instance;
            ?>
				<button class="btn btn-danger pull-right" type="submit" name="delete" value="<?php 
            echo $instance_data['id'];
            ?>
"><?php 
            echo Translate('Verwijderen');
            ?>
</button>
			</legend>
			<div class="control-group">
				<label class="control-label" for="<?php 
            echo $instance;
            ?>
_title"><?php 
            echo Translate('Titel');
            ?>
</label>
				<div class="controls">
					<input type="text" name="title[<?php 
            echo $instance_data['id'];
            ?>
]" value="<?php 
            echo $instance_data['title'];
            ?>
" class="input-xlarge" id="<?php 
            echo $instance;
            ?>
_title" />
				</div>
			</div>
			<div class="control-group">
//.........这里部分代码省略.........
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:101,代码来源:Flat_module.php

示例3: administrator

    public function administrator()
    {
        global $Modules, $login;
        echo '<h1>';
        echo get_class($this);
        if ($login == 'aboservice') {
            echo '<button type="button" id="delete_module" href="' . tep_href_link('checkout.php', 'module=' . $_GET['module']) . '&action=delete_module" class="btn btn-danger pull-right">' . Translate('Verwijder module') . '</button>';
        }
        echo '</h1>';
        echo '<hr />';
        if (isset($_POST['action']) && $_POST['action'] == 'save') {
            /********************/
            /*	Save changes	*/
            /********************/
            unset($_POST['action']);
            foreach ($_POST as $key => $data) {
                if ($key == 'zone') {
                    if (isset($data['*'])) {
                        $_POST[$key] = '*';
                    } else {
                        $_POST[$key] = implode(';', $data);
                    }
                }
            }
            tep_db_perform('checkout_' . get_class($this), $_POST, 'update', 'id="1"');
            $this->update_config();
        } else {
            if (isset($_GET['action']) && $_GET['action'] == 'delete_module') {
                /********************/
                /*	Delete module	*/
                /********************/
                unset($_GET['action']);
                parent::delete_module(get_class($this));
            }
        }
        ?>
		<form name="<?php 
        echo get_class($this);
        ?>
" class="form-horizontal well" action="<?php 
        echo tep_href_link('checkout.php', 'module=' . $_GET['module']);
        ?>
" method="post">
			<input type="hidden" name="action" value="save" />
			<fieldset>
			<div class="control-group">
				<label class="control-label" for="title"><?php 
        echo Translate('Titel');
        ?>
</label>
				<div class="controls">
					<input type="text" name="title" value="<?php 
        echo $this->config['title'];
        ?>
" class="input-xlarge" id="title" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="status"><?php 
        echo Translate('Status');
        ?>
</label>
				<div class="controls">
					<div class="btn-group" data-toggle="buttons-radio">
						<button type="submit" name="status" value="true" class="btn<?php 
        echo $this->config['status'] == 'true' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Actief');
        ?>
</button>
						<button type="submit" name="status" value="false" class="btn<?php 
        echo $this->config['status'] == 'false' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Niet actief');
        ?>
</button>
					</div>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="description"><?php 
        echo Translate('Omschrijving');
        ?>
</label>
				<div class="controls">
					<input type="text" name="description" value="<?php 
        echo $this->config['description'];
        ?>
" class="input-xxlarge" id="description" />
					<span class="help-block"><?php 
        echo Translate('Omschrijving gebruikt in de checkout, samen met de titel');
        ?>
</span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="shipping_cost"><?php 
        echo Translate('Verzendkost');
//.........这里部分代码省略.........
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:101,代码来源:Kiala_module.php

示例4: administrator

    public function administrator()
    {
        global $Modules, $login;
        echo '<h1>';
        echo get_class($this);
        if ($login == 'aboservice') {
            echo '<button type="button" id="delete_module" href="' . tep_href_link('checkout.php', 'module=' . $_GET['module']) . '&action=delete_module" class="btn btn-danger pull-right">' . Translate('Verwijder module') . '</button>';
        }
        echo '</h1>';
        echo '<hr />';
        if (isset($_POST['action']) && $_POST['action'] == 'save') {
            /********************/
            /*	Save changes	*/
            /********************/
            unset($_POST['action']);
            foreach ($_POST as $key => $data) {
                if ($key == 'zone') {
                    if (isset($data['*'])) {
                        $_POST[$key] = '*';
                    } else {
                        $_POST[$key] = implode(';', $data);
                    }
                }
            }
            tep_db_perform('checkout_' . get_class($this), $_POST, 'update', 'id="1"');
            $this->update_config();
        } else {
            if (isset($_GET['action']) && $_GET['action'] == 'delete_module') {
                /********************/
                /*	Delete module	*/
                /********************/
                unset($_GET['action']);
                parent::delete_module(get_class($this));
            }
        }
        ?>
		<form name="<?php 
        echo get_class($this);
        ?>
" class="form-horizontal well" action="<?php 
        echo tep_href_link('checkout.php', 'module=' . $_GET['module']);
        ?>
" method="post">
			<input type="hidden" name="action" value="save" />
			<fieldset>
			<div class="control-group">
				<label class="control-label" for="title"><?php 
        echo Translate('Titel');
        ?>
</label>
				<div class="controls">
					<input type="text" name="title" value="<?php 
        echo $this->config['title'];
        ?>
" class="input-xlarge" id="title" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="status"><?php 
        echo Translate('Status');
        ?>
</label>
				<div class="controls">
					<div class="btn-group" data-toggle="buttons-radio">
						<button type="submit" name="status" value="true" class="btn<?php 
        echo $this->config['status'] == 'true' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Actief');
        ?>
</button>
						<button type="submit" name="status" value="false" class="btn<?php 
        echo $this->config['status'] == 'false' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Niet actief');
        ?>
</button>
					</div>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="description"><?php 
        echo Translate('Omschrijving');
        ?>
</label>
				<div class="controls">
					<input type="text" name="description" value="<?php 
        echo $this->config['description'];
        ?>
" class="input-xxlarge" id="description" />
					<span class="help-block"><?php 
        echo Translate('Omschrijving gebruikt in de checkout, samen met de titel');
        ?>
</span>
				</div>
			</div>
			<div class="form-actions">
				<button class="btn btn-primary" type="submit"><?php 
        echo Translate('Opslaan');
//.........这里部分代码省略.........
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:101,代码来源:Billing_address_module.php

示例5: administrator

    public function administrator()
    {
        global $Modules, $login;
        echo '<h1>';
        echo get_class($this);
        if ($login == 'aboservice') {
            echo '<button type="button" id="delete_module" href="' . tep_href_link('checkout.php', 'module=' . $_GET['module']) . '&action=delete_module" class="btn btn-danger pull-right">' . Translate('Verwijder module') . '</button>';
            echo '<button type="button" id="add_new" class="btn btn-primary pull-right" style="margin-right:5px;">' . Translate('Voeg een instantie toe') . '</button>';
        }
        echo '</h1>';
        echo '<hr />';
        if (isset($_POST['action']) && $_POST['action'] == 'save') {
            if (isset($_POST['delete'])) {
                /********************/
                /*	Delete instance	*/
                /********************/
                tep_db_query('DELETE FROM checkout_' . get_class($this) . ' WHERE id = "' . $_POST['delete'] . '"');
            } else {
                /********************/
                /*	Save changes	*/
                /********************/
                $instances = array();
                unset($_POST['action']);
                if (!isset($_POST['method_images'])) {
                    foreach ($this->instances as $key => $data) {
                        $_POST['method_images'][$data['id']] = array();
                    }
                }
                foreach ($_POST as $key => $data) {
                    foreach ($data as $id => $value) {
                        if ($key == 'zone' || $key == 'shipping_module') {
                            if (isset($value['*'])) {
                                $instances[$id][$key] = '*';
                            } else {
                                $instances[$id][$key] = implode(';', $value);
                            }
                        } else {
                            if ($key == 'method_images') {
                                $instances[$id][$key] = implode(';', $value);
                            } else {
                                $instances[$id][$key] = $value;
                            }
                        }
                    }
                }
                foreach ($instances as $id => $data) {
                    if (isset($this->instances[get_class($this) . '_' . $id])) {
                        tep_db_perform('checkout_' . get_class($this), $data, 'update', 'id="' . $id . '"');
                    } else {
                        $data['id'] = $id;
                        tep_db_perform('checkout_' . get_class($this), $data, 'insert');
                    }
                }
            }
            $this->update_instances();
        } else {
            if (isset($_GET['action']) && $_GET['action'] == 'delete_module') {
                /********************/
                /*	Delete module	*/
                /********************/
                unset($_GET['action']);
                parent::delete_module(get_class($this));
            }
        }
        foreach ($this->instances as $instance => $instance_data) {
            ?>
		<form name="<?php 
            echo $instance;
            ?>
" class="form-horizontal well" action="<?php 
            echo tep_href_link('checkout.php', 'module=' . $_GET['module']);
            ?>
" method="post">
			<input type="hidden" name="action" value="save" />
			<fieldset>
			<legend>
				<?php 
            echo $instance;
            ?>
				<button class="btn btn-danger pull-right" type="submit" name="delete" value="<?php 
            echo $instance_data['id'];
            ?>
"><?php 
            echo Translate('Verwijderen');
            ?>
</button>
			</legend>
			<div class="control-group">
				<label class="control-label" for="<?php 
            echo $instance;
            ?>
_title"><?php 
            echo Translate('Titel');
            ?>
</label>
				<div class="controls">
					<input type="text" name="title[<?php 
            echo $instance_data['id'];
            ?>
]" value="<?php 
//.........这里部分代码省略.........
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:101,代码来源:Ogone_module.php

示例6: administrator

    public function administrator()
    {
        global $Modules, $login;
        echo '<h1>';
        echo get_class($this);
        if ($login == 'aboservice') {
            echo '<button type="button" id="delete_module" href="' . tep_href_link('checkout.php', 'module=' . $_GET['module']) . '&action=delete_module" class="btn btn-danger pull-right">' . Translate('Verwijder module') . '</button>';
            echo '<button type="button" id="add_new" class="btn btn-primary pull-right" style="margin-right:5px;">' . Translate('Voeg een instantie toe') . '</button>';
        }
        echo '</h1>';
        echo '<hr />';
        if (isset($_POST['action']) && $_POST['action'] == 'save') {
            if (isset($_POST['delete'])) {
                /********************/
                /*	Delete instance	*/
                /********************/
                tep_db_query('DELETE FROM checkout_' . get_class($this) . ' WHERE id = "' . $_POST['delete'] . '"');
            } else {
                /********************/
                /*	Save changes	*/
                /********************/
                $instances = array();
                unset($_POST['action']);
                foreach ($_POST as $key => $data) {
                    foreach ($data as $id => $value) {
                        if ($key == 'zone' || $key == 'shipping_module') {
                            if (isset($value['*'])) {
                                $instances[$id][$key] = '*';
                            } else {
                                $instances[$id][$key] = implode(';', $value);
                            }
                        } else {
                            if (strstr($key, 'Icepay_Paymentmethod_')) {
                                $file = strtolower(str_replace('Icepay_Paymentmethod_', '', $key));
                                $this->writeToMethodFile($data, $key, $file);
                                unset($_POST[$key]);
                                break;
                            } else {
                                $instances[$id][$key] = $value;
                            }
                        }
                    }
                }
                foreach ($instances as $id => $data) {
                    if (isset($this->instances[get_class($this) . '_' . $id])) {
                        tep_db_perform('checkout_' . get_class($this), $data, 'update', 'id="' . $id . '"');
                    } else {
                        $data['id'] = $id;
                        tep_db_perform('checkout_' . get_class($this), $data, 'insert');
                    }
                }
            }
            header("Location: " . $_SERVER['HTTP_REFERER']);
            $this->update_instances();
        } else {
            if (isset($_GET['action']) && $_GET['action'] == 'delete_module') {
                /********************/
                /*	Delete module	*/
                /********************/
                unset($_GET['action']);
                parent::delete_module(get_class($this));
            }
        }
        $api = Icepay_Api_Basic::getInstance()->readFolder(realpath('api/paymentmethods'))->prepareFiltering();
        foreach ($this->instances as $instance => $instance_data) {
            ?>
		<form name="<?php 
            echo $instance;
            ?>
" class="form-horizontal well" action="<?php 
            echo tep_href_link('checkout.php', 'module=' . $_GET['module']);
            ?>
" method="post">
			<input type="hidden" name="action" value="save" />
			<fieldset>
			<legend>
				<?php 
            echo $instance;
            ?>
				<button class="btn btn-danger pull-right" type="submit" name="delete" value="<?php 
            echo $instance_data['id'];
            ?>
"><?php 
            echo Translate('Verwijderen');
            ?>
</button>
			</legend>
			<div class="control-group">
				<label class="control-label" for="<?php 
            echo $instance;
            ?>
_title"><?php 
            echo Translate('Titel');
            ?>
</label>
				<div class="controls">
					<input type="text" name="title[<?php 
            echo $instance_data['id'];
            ?>
]" value="<?php 
//.........这里部分代码省略.........
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:101,代码来源:Icepay_module.php

示例7: administrator

    public function administrator()
    {
        global $Modules;
        echo '<h1>';
        echo get_class($this);
        echo '<button type="button" id="delete_module" href="' . tep_href_link('checkout.php', 'module=' . $_GET['module']) . '&action=delete_module" class="btn btn-danger pull-right">' . Translate('Verwijder module') . '</button>';
        echo '</h1>';
        echo '<hr />';
        if (isset($_POST['action']) && $_POST['action'] == 'save') {
            /********************/
            /*	Save changes	*/
            /********************/
            unset($_POST['action']);
            foreach ($_POST as $key => $data) {
                if ($key == 'bpost_types') {
                    $types_total = 0;
                    foreach ($data as $type => $value) {
                        $types_total += $type;
                    }
                    $_POST[$key] = $types_total;
                }
            }
            tep_db_perform('checkout_' . get_class($this), $_POST, 'update', 'id="1"');
            $this->update_config();
        } else {
            if (isset($_GET['action']) && $_GET['action'] == 'delete_module') {
                /********************/
                /*	Delete module	*/
                /********************/
                unset($_GET['action']);
                parent::delete_module(get_class($this));
            }
        }
        ?>
		<form name="<?php 
        echo get_class($this);
        ?>
" class="form-horizontal well" action="<?php 
        echo tep_href_link('checkout.php', 'module=' . $_GET['module']);
        ?>
" method="post">
			<input type="hidden" name="action" value="save" />
			<fieldset>
			<div class="control-group">
				<label class="control-label" for="title"><?php 
        echo Translate('Titel');
        ?>
</label>
				<div class="controls">
					<input type="text" name="title" value="<?php 
        echo $this->config['title'];
        ?>
" class="input-xlarge" id="title" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="status"><?php 
        echo Translate('Status');
        ?>
</label>
				<div class="controls">
					<div class="btn-group" data-toggle="buttons-radio">
						<button type="submit" name="status" value="true" class="btn<?php 
        echo $this->config['status'] == 'true' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Actief');
        ?>
</button>
						<button type="submit" name="status" value="false" class="btn<?php 
        echo $this->config['status'] == 'false' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Niet actief');
        ?>
</button>
					</div>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="description"><?php 
        echo Translate('Omschrijving');
        ?>
</label>
				<div class="controls">
					<input type="text" name="description" value="<?php 
        echo $this->config['description'];
        ?>
" class="input-xxlarge" id="description" />
					<span class="help-block"><?php 
        echo Translate('Omschrijving gebruikt in de checkout, samen met de titel');
        ?>
</span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="account_id"><?php 
        echo Translate('Account Id');
        ?>
</label>
//.........这里部分代码省略.........
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:101,代码来源:Bpost_module.php

示例8: administrator

    public function administrator()
    {
        global $Modules, $login;
        echo '<h1>';
        echo get_class($this);
        if ($login == 'aboservice') {
            echo '<button type="button" id="delete_module" href="' . tep_href_link('checkout.php', 'module=' . $_GET['module']) . '&action=delete_module" class="btn btn-danger pull-right">' . Translate('Verwijder module') . '</button>';
        }
        echo '</h1>';
        echo '<hr />';
        if (isset($_POST['action']) && $_POST['action'] == 'save') {
            if (isset($_POST['delete'])) {
                /********************/
                /*	Delete instance	*/
                /********************/
                tep_db_query('DELETE FROM checkout_' . get_class($this) . ' WHERE id = "' . $_POST['delete'] . '"');
            } else {
                /********************/
                /*	Save changes	*/
                /********************/
                $instances = array();
                unset($_POST['action']);
                tep_db_perform('checkout_' . get_class($this), $_POST, 'update', 'id="1"');
            }
            $this->update_config();
        } else {
            if (isset($_GET['action']) && $_GET['action'] == 'delete_module') {
                /********************/
                /*	Delete module	*/
                /********************/
                unset($_GET['action']);
                parent::delete_module(get_class($this));
            }
        }
        ?>
		<form name="<?php 
        echo get_class($this);
        ?>
" class="form-horizontal well" action="<?php 
        echo tep_href_link('checkout.php', 'module=' . $_GET['module']);
        ?>
" method="post">
			<input type="hidden" name="action" value="save" />
			<fieldset>
			<div class="control-group">
				<label class="control-label" for="title"><?php 
        echo Translate('Titel');
        ?>
</label>
				<div class="controls">
					<input type="text" name="title" value="<?php 
        echo $this->config['title'];
        ?>
" class="input-xxlarge" id="title" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="status"><?php 
        echo Translate('Status');
        ?>
</label>
				<div class="controls">
					<div class="btn-group" data-toggle="buttons-radio">
						<button type="submit" name="status" value="true" class="btn<?php 
        echo $this->config['status'] == 'true' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Actief');
        ?>
</button>
						<button type="submit" name="status" value="false" class="btn<?php 
        echo $this->config['status'] == 'false' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Niet actief');
        ?>
</button>
					</div>
				</div>
			</div>
			<div class="form-actions">
				<button class="btn btn-primary" type="submit"><?php 
        echo Translate('Opslaan');
        ?>
</button>
				<button class="btn" type="reset"><?php 
        echo Translate('Annuleren');
        ?>
</button>
			</div>
			</fieldset>
		</form>
		<?php 
    }
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:94,代码来源:Comments_module.php

示例9: administrator

    public function administrator()
    {
        global $Modules, $login;
        echo '<h1>';
        echo get_class($this);
        if ($login == 'aboservice') {
            echo '<button type="button" id="delete_module" href="' . tep_href_link('checkout.php', 'module=' . $_GET['module']) . '&action=delete_module" class="btn btn-danger pull-right">' . Translate('Verwijder module') . '</button>';
        }
        echo '</h1>';
        echo '<hr />';
        if (isset($_POST['action']) && $_POST['action'] == 'save') {
            /********************/
            /*	Save changes	*/
            /********************/
            unset($_POST['action']);
            foreach ($_POST as $key => $data) {
                if ($key == 'zone' || $key == 'shipping_module') {
                    if (isset($data['*'])) {
                        $_POST[$key] = '*';
                    } else {
                        $_POST[$key] = implode(';', $data);
                    }
                }
            }
            tep_db_perform('checkout_' . get_class($this), $_POST, 'update', 'id="1"');
            $this->update_config();
        } else {
            if (isset($_GET['action']) && $_GET['action'] == 'delete_module') {
                /********************/
                /*	Delete module	*/
                /********************/
                unset($_GET['action']);
                parent::delete_module(get_class($this));
            }
        }
        ?>
		<form name="<?php 
        echo get_class($this);
        ?>
" class="form-horizontal well" action="<?php 
        echo tep_href_link('checkout.php', 'module=' . $_GET['module']);
        ?>
" method="post">
			<input type="hidden" name="action" value="save" />
			<fieldset>
			<div class="control-group">
				<label class="control-label" for="title"><?php 
        echo Translate('Titel');
        ?>
</label>
				<div class="controls">
					<input type="text" name="title" value="<?php 
        echo $this->config['title'];
        ?>
" class="input-xlarge" id="title" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="status"><?php 
        echo Translate('Status');
        ?>
</label>
				<div class="controls">
					<div class="btn-group" data-toggle="buttons-radio">
						<button type="submit" name="status" value="true" class="btn<?php 
        echo $this->config['status'] == 'true' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Actief');
        ?>
</button>
						<button type="submit" name="status" value="false" class="btn<?php 
        echo $this->config['status'] == 'false' ? ' active' : '';
        ?>
"><?php 
        echo Translate('Niet actief');
        ?>
</button>
					</div>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="description"><?php 
        echo Translate('Omschrijving');
        ?>
</label>
				<div class="controls">
					<input type="text" name="description" value="<?php 
        echo $this->config['description'];
        ?>
" class="input-xxlarge" id="description" />
					<span class="help-block"><?php 
        echo Translate('Omschrijving gebruikt in de checkout, samen met de titel');
        ?>
</span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="order_status_id"><?php 
        echo Translate('Bestel status');
//.........这里部分代码省略.........
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:101,代码来源:Coupon_module.php


注:本文中的Modules::delete_module方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。