Пример #1
0
 function cleanDBonPurge()
 {
     $temp = new PluginIdeaboxComment();
     $temp->deleteByCriteria(array('plugin_ideabox_ideaboxes_id' => $this->fields['id']));
 }
Пример #2
0
You should have received a copy of the GNU General Public License
along with Ideabox. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
if (!isset($_GET["withtemplate"])) {
    $_GET["withtemplate"] = "";
}
if (!isset($_GET["plugin_ideabox_ideaboxes_id"])) {
    $_GET["plugin_ideabox_ideaboxes_id"] = "";
}
$comment = new PluginIdeaboxComment();
if (isset($_POST["add"])) {
    $comment->check(-1, 'w', $_POST);
    $comment->add($_POST);
    Html::back();
} else {
    if (isset($_POST["update"])) {
        $comment->check($_POST['id'], 'w');
        $comment->update($_POST);
        Html::back();
    } else {
        if (isset($_POST["delete"])) {
            $comment->check($_POST['id'], 'w');
            $comment->delete($_POST, 1);
            Html::redirect(Toolbox::getItemTypeFormURL('PluginIdeaboxIdeabox') . "?id=" . $_POST["plugin_ideabox_ideaboxes_id"]);
        } else {