public function saveMsgInArchives($args) { //msg_id in $args array $args['send_date'] = date("Y-m-d G:i:s A"); $ma_Savecols = array('msg_id', 'send_date', 'grp_ids'); $save_ob2 = new saveform('mailing_archive', $args, $ma_Savecols); //save to archive return $save_ob2->getInsertId(); }
$is_static = $_REQUEST['is_static']; if (!$is_static) { $lang_type = $_REQUEST['lang_type']; if ($lang_type == 'Table') { $lang_field = " `lang` varchar(255) , "; } else { $lang_field = ""; } $create_table = $pdo->exec("CREATE TABLE IF NOT EXISTS `" . $table_name . "` (\n\t\t\t\t`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\t{$lang_field}\n\t\t\t\t`page_id` VARCHAR(100) NOT NULL,\n\t\t\t\t`item_order` INT NOT NULL\n\t\t\t\t) ;"); } if ($_REQUEST['static_path'] != "") { $_REQUEST['is_static'] = 1; } else { $_REQUEST['is_static'] = 0; } $save_ob = new saveform($db_table, $_REQUEST, $Savecols, 'id', ''); $insert_id = $save_ob->getInsertId(); $module_id = $save_ob->getInsertId(); $save_ob = new saveform('cms_module_roles', array('action' => 'Insert', 'module_id' => $module_id, 'role' => 'list'), array('module_id', 'role'), 'id', '', "", "", false); $save_ob = new saveform('cms_module_roles', array('action' => 'Insert', 'module_id' => $module_id, 'role' => 'insert'), array('module_id', 'role'), 'id', '', "", "", false); $save_ob = new saveform('cms_module_roles', array('action' => 'Insert', 'module_id' => $module_id, 'role' => 'update'), array('module_id', 'role'), 'id', '', "", "", false); $save_ob = new saveform('cms_module_roles', array('action' => 'Insert', 'module_id' => $module_id, 'role' => 'delete'), array('module_id', 'role'), 'id', '', "", "", false); $save_ob = new saveform('cms_module_roles', array('action' => 'Insert', 'module_id' => $module_id, 'role' => 'publish'), array('module_id', 'role'), 'id', '', "", "", false); if ($_REQUEST['saveContinue'] != "") { if ($next_group != "") { $utils->redirect($pageFields . "?cmsMID=1&id={$insert_id}&table_id={$insert_id}&gr_id_pg={$next_group}"); } else { $utils->redirect($pageList); } } else { $utils->redirect($pageList);
$module_lang_type = $row['lang_type']; $is_gridlist = $row['is_gridlist']; $has_order = $row['has_order']; } $table = $_REQUEST['table']; $id = $_REQUEST['id']; $redirect = $_REQUEST['redirect']; $cols_req = rtrim($_REQUEST['cols'], ','); $cols = explode(',', $cols_req); $get_values = $fpdo->from($table)->where("id='{$id}'")->fetch(); $get_values['id'] = ""; $get_values['action'] = 'Insert'; if ($module_lang_type == 'Table') { $get_values['lang'] = $cmsMlang; } $save_ob = new saveform($table, $get_values, $cols, "id", $order_field, $map_field, '', true, false); $insert_id = $save_ob->getInsertId(); $get_page_inserted = $fpdo->from($table)->where("id='{$insert_id}'")->fetch(); $page_id_inserted = $get_page_inserted['page_id']; if ($page_id_inserted != "") { $pages_arr = explode(',', $page_id_inserted); if (count($pages_arr) > 0) { $get_page_for_dub = $fpdo->from($table)->where("id='{$id}'")->fetch(); $get_seo_details_arr = explode(',', $get_page_for_dub['page_id']); $i = 0; foreach ($get_seo_details_arr as $seo_page) { $get_seo_details = $fpdo->from('cms_pages')->where("id='" . $seo_page . "'")->fetch(); $fpdo->update('cms_pages')->set(array('`seo_description`' => $get_seo_details['seo_description'], '`seo_keywords`' => $get_seo_details['seo_keywords'], '`seo_img`' => $get_seo_details['seo_img']))->where("id='" . $pages_arr[$i] . "'")->execute(); //file_put_contents('seoPages.txt', $get_page_for_dub['page_id']); $i++; }
<?php include 'config.php'; include '../../common/header.php'; ?> <? if (isset($_REQUEST) && $_REQUEST['action'] == 'Insert') { $save_ob = new saveform($db_table, $_REQUEST, $Savecols); $temp_id = $save_ob->getInsertId(); $t_field = $temp_maker->insertTmplateFields($_REQUEST['main_html'],$_REQUEST['item_html'],$temp_id); $t_settings = $temp_maker->insertTemplateSettings($_REQUEST['main_html'],$_REQUEST['item_html'],$temp_id); $temp_maker->insertTemplateLabels($_REQUEST['main_html'],$_REQUEST['item_html']); $utils->redirect($pageList); } $form = new GenerateFormField(); $form->setColumns($cols); $form->setTypes($types); $form->setExtendTables($source); $form->setRequireds($required); $form->setCountCell(1); $form->setSubmit(true); $form->setAsForm(true); echo $ob_roles->getInsertRole($grp_id,$form,$module_id); include_once '../../common/footer.php'; ?>
$save_ob = new saveform('cms_widget_settings', $values, array('template_id', 'widget_id'), 'id', ''); } elseif (!$viewAll_temp) { //echo 'c'; $_REQUST['all_wid_id'] = 0; $_REQUST['id'] = $module_id; $_REQUST['action'] = 'Edit'; $save_ob = new saveform('cms_modules', $_REQUST, array('all_wid_id', 'id'), 'id', ''); } if ($view_temp != $view_temp_id && $view_temp) { // echo 'd'; $old_wid_id = $utils->lookupField('cms_modules', 'id', 'item_wid_id', $module_id); $fpdo->deleteFrom("cms_widgets")->where("module_id='{$module_id}' and id='{$old_wid_id}'")->execute(); $fpdo->deleteFrom("cms_widget_fields")->where(" widget_id='{$old_wid_id}'")->execute(); $fpdo->deleteFrom("cms_widget_settings")->where(" widget_id='{$old_wid_id}'")->execute(); $values = array('module_id' => $module_id, 'title' => $module_title . ' - view item details page', 'action' => 'Insert'); $save_ob = new saveform('cms_widgets', $values, array('module_id', 'title'), 'id', ''); $item_wid_id = $save_ob->getInsertId(); $values = array('template_id' => $view_temp, 'widget_id' => $item_wid_id, 'action' => 'Insert'); $save_ob = new saveform('cms_widget_settings', $values, array('template_id', 'widget_id'), 'id', ''); $_REQUST['item_wid_id'] = $item_wid_id; $_REQUST['id'] = $module_id; $_REQUST['action'] = 'Edit'; $save_ob = new saveform('cms_modules', $_REQUST, array('item_wid_id', 'id'), 'id', ''); } elseif ($view_temp != $view_temp_id && $item_wid_id) { // echo 'e'; $wid_settings_id = $utiles->lookupField('cms_widget_settings', 'id', 'id', '', " widget_id='{$item_wid_id}' "); $values = array('id' => $wid_settings_id, 'template_id' => $view_temp, 'widget_id' => $item_wid_id, 'action' => 'Edit'); $save_ob = new saveform('cms_widget_settings', $values, array('template_id', 'widget_id'), 'id', ''); } elseif (!$view_temp) { // echo 'f'; $_REQUST['item_wid_id'] = 0;
public function createMsg($db_table, $db_table_directions, $db_cms_users, $values, $Savecols, $dSavecols, $from_id, $sendTo) { $values['date'] = date("Y-m-d h:i:s"); $save_ob = new saveform($db_table, $values, $Savecols); $msg_id = $save_ob->getInsertId(); foreach ($sendTo as $toId) { //save infromation in direction table $values['from_id'] = $from_id; $values['msg_id'] = $msg_id; $values['to_id'] = $toId; $values['isRead'] = 'no'; //print_r($values) ." <br />"; $save_ob = new saveform($db_table_directions, $values, $dSavecols); } }