Beispiel #1
0
             } else {
                 $db->Execute("update " . TABLE_RECORD_ARTISTS . "\r\n                          set artists_image = ''\r\n                          where artists_id = '" . (int) $artists_id . "'");
             }
         }
     }
     $languages = zen_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $artists_url_array = $_POST['artists_url'];
         $language_id = $languages[$i]['id'];
         $sql_data_array = array('artists_url' => zen_db_prepare_input($artists_url_array[$language_id]));
         if ($action == 'insert') {
             $insert_sql_data = array('artists_id' => $artists_id, 'languages_id' => $language_id);
             $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
             zen_db_perform(TABLE_RECORD_ARTISTS_INFO, $sql_data_array);
         } elseif ($action == 'save') {
             zen_db_perform_language(TABLE_RECORD_ARTISTS_INFO, $sql_data_array, 'artists_id', (int) $artists_id, (int) $language_id);
         }
     }
     zen_redirect(zen_href_link(FILENAME_RECORD_ARTISTS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'mID=' . $artists_id));
     break;
 case 'deleteconfirm':
     // demo active test
     if (zen_admin_demo()) {
         $_GET['action'] = '';
         $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
         zen_redirect(zen_href_link(FILENAME_RECORD_ARTISTS, 'page=' . $_GET['page']));
     }
     $artists_id = zen_db_prepare_input($_POST['mID']);
     if (isset($_POST['delete_image']) && $_POST['delete_image'] == 'on') {
         $manufacturer = $db->Execute("select artists_image\r\n                                        from " . TABLE_RECORD_ARTISTS . "\r\n                                        where artists_id = '" . (int) $artists_id . "'");
         $image_location = DIR_FS_CATALOG_IMAGES . $manufacturer->fields['artists_image'];
Beispiel #2
0
             } else {
                 $db->Execute("update " . TABLE_RECORD_COMPANY . "\n                          set record_company_image = ''\n                          where record_company_id = '" . (int) $record_company_id . "'");
             }
         }
     }
     $languages = zen_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $record_company_url_array = $_POST['record_company_url'];
         $language_id = $languages[$i]['id'];
         $sql_data_array = array('record_company_url' => zen_db_prepare_input($record_company_url_array[$language_id]));
         if ($action == 'insert') {
             $insert_sql_data = array('record_company_id' => $record_company_id, 'languages_id' => $language_id);
             $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
             zen_db_perform(TABLE_RECORD_COMPANY_INFO, $sql_data_array);
         } elseif ($action == 'save') {
             zen_db_perform_language(TABLE_RECORD_COMPANY_INFO, $sql_data_array, 'record_company_id', (int) $record_company_id, (int) $language_id);
         }
     }
     zen_redirect(zen_href_link(FILENAME_RECORD_COMPANY, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'mID=' . $record_company_id));
     break;
 case 'deleteconfirm':
     // demo active test
     if (zen_admin_demo()) {
         $_GET['action'] = '';
         $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
         zen_redirect(zen_href_link(FILENAME_RECORD_COMPANY, 'page=' . $_GET['page']));
     }
     $record_company_id = zen_db_prepare_input($_POST['mID']);
     if (isset($_POST['delete_image']) && $_POST['delete_image'] == 'on') {
         $record_company = $db->Execute("select record_company_image\n                                        from " . TABLE_RECORD_COMPANY . "\n                                        where record_company_id = '" . (int) $record_company_id . "'");
         $image_location = DIR_FS_CATALOG_IMAGES . $record_company->fields['record_company_image'];