require 'config.phtml';
require 'init_mysql.phtml';
require 'message.phtml';
require 'ams_common.phtml';
require 'ams_forms.phtml';
require 'utils.phtml';
session_start();
$error_code = 0;
while (true) {
$new_id = false;
if (!isset($wizard_id) || (isset($wizard_id) && $wizard_id == '') || (isset($new) && $new == 'on')) {
$new_id = true;
} else {
$query = <<$wizard_id";
}
$_SESSION['wizard_id'] = $wizard_id;
$query = <<NOTE: Unfortunately we are not able to provide CPA quote at this time. Please email your request at sales@valuead.com
STR;
include 'wizard_header.html';
$form = ams_form_set_options(
'Campaign Wizard Step 1',
'wizard',
'wizard_1.phtml',
'post',
'Next step',
'return wizard_1_data_check();',
'next'
);
$form = ams_form_add_line(
$form,
'The Address Of The Web Site You Want To Promote',
true,
ams_form_make_text(
'url',
30,
isset($url) ? $url : $wizard[0][11]
),
false,
check_form_error(-6005, -2106)
);
unset($_SESSION['url']);
if ($new_id == true) {
$objective_id = 1;
} else {
$objective_id = $wizard[0][1] == 0 ? 1 : $wizard[0][1];
}
$form = ams_form_add_line(
$form,
'What Is The Objective Of Your Campaign?',
false,
ams_form_make_select(
'objective_id',
$objectives,
$objective_id
),
false
);
unset($_SESSION['objective_id']);
if ($new_id == true) {
$type_id = 0;
} else {
$type_id = $wizard[0][2];
}
$array[0][0] = 0;
$array[0][1] = 'CPM (Cost Per 1000 Impressions)';
$array[1][0] = 1;
$array[1][1] = 'CPC (Cost Per Click)';
$array[2][0] = 2;
$array[2][1] = 'CPA (Cost Per Action)';
$array['rows'] = 2;
$form = ams_form_add_line(
$form,
'You Buy Media Based On',
false,
ams_form_make_select(
'type_id',
$array,
$type_id
),
false
);
unset($_SESSION['type_id']);
$amount = '';
if ($wizard[0][3] != 0) {
$amount = $wizard[0][3];
}
if ($wizard[0][4] != 0) {
$amount = $wizard[0][4];
}
$form = ams_form_add_line(
$form,
'How Many Impressions/Clicks would you like?',
false,
ams_form_make_text(
'ordered_amount',
20,
isset($ordered_amount) ? $ordered_amount : $amount
),
false
);
unset($_SESSION['ordered_amount']);
/*
if ($new_id == true) {
$budget_id = 1;
} else {
$budget_id = $wizard[0][5] == 0 ? 1 : $wizard[0][5];
}
$form = ams_form_add_line(
$form,
'What Is Your Budget?',
false,
ams_form_make_select(
'budget_id',
$budgets,
$budget_id
),
false
);
*/
if ($new_id == true) {
$geometry_id = 1;
} else {
$geometry_id = $wizard[0][6] == 0 ? 1 : $wizard[0][6];
}
$form = ams_form_add_line(
$form,
'What Size Of The Creative You Preferred The Most?',
false,
ams_form_make_select(
'geometry_id',
$geometries,
$geometry_id
),
false
);
$form = ams_form_add_line(
$form,
'You May Track Visitor Via Our SmartTracking© Technology',
false,
'',
true
);
$form = ams_form_add_line(
$form,
'How Many Times Will You Allow To Show Your Creative To Unique Visitor?',
false,
ams_form_make_text(
'max_unique_impressions',
20,
$wizard[0][7] == 0 ? '' : $wizard[0][7]
),
false
);
$form = ams_form_add_line(
$form,
'How Frequently You Would Like To Show Creative To Unique Visitor (seconds)?',
false,
ams_form_make_text(
'unique_period_impressions',
20,
$wizard[0][8] == 0 ? '' : $wizard[0][8]
),
false
);
$form = ams_form_add_line(
$form,
'How Many Times Will You Allow Unique Visitor To Click On Your Banner?',
false,
ams_form_make_text(
'max_unique_clicks',
20,
$wizard[0][9] == 0 ? '' : $wizard[0][9]
),
false
);
$form = ams_form_add_line(
$form,
'How Frequently You Would Allow Unique Visitor To Click On Your Creative?',
false,
ams_form_make_text(
'unique_period_clicks',
20,
$wizard[0][10] == 0 ? '' : $wizard[0][10]
),
false
);
if (isset($_SESSION['error_codes']) && count($_SESSION['error_codes']) > 0) {
ams_common_show_error_inline();
unset($_SESSION['error_codes']);
}
ams_form_show_form($form);
include 'wizard_footer.html';
break;
}
if ($error_code != 0) {
include 'wizard_error_header.html';
print ams_common_get_message($error_code);
include 'wizard_footer.html';
}
print $_SESSION['wizard_id'];
include 'wizard_data_check.phtml';
?>