Example #1
0
            $str_find[] = ''';
            $str_replace[] = "'";
            $str_find[] = '"';
            $str_replace[] = '"';
            while ($i != $vbulletin->options['adintegrate_custom_count'] + 1) {
                $custom_x = 'custom' . $i;
                $adintegrate_customx_onoff = 'adintegrate_custom' . $i . '_onoff';
                $adintegrate_customx_refresh = 'adintegrate_custom' . $i . '_refresh';
                $adintegrate_customx_timescale = 'adintegrate_custom' . $i . '_timescale';
                $adintegrate_customx_adcode = 'adintegrate_custom' . $i . '_adcode';
                $adintegrate_customx_autoinsert = 'adintegrate_custom' . $i . '_autoinsert';
                $adintegrate_customx_template = $vbulletin->options['adintegrate_' . $custom_x . '_template'];
                $customx_advertisement = 'custom' . $i . '_advertisement';
                if ($vbulletin->options["{$adintegrate_customx_onoff}"] == '1' && isset($vbulletin->templatecache["{$adintegrate_customx_template}"])) {
                    if (checkadtime($vbulletin->options["{$adintegrate_customx_timescale}"]) != '1') {
                        ${$customx_advertisement} = '<div id="' . $custom_x . '_adcode">' . createad($vbulletin->options["{$adintegrate_customx_adcode}"]);
                        if ($vbulletin->options["{$adintegrate_customx_refresh}"] != '0') {
                            ${$customx_advertisement} .= '<script type="text/javascript">setInterval("recreatead_' . $custom_x . '()", "' . ($vbulletin->options["{$adintegrate_customx_refresh}"] * 1000 + mt_rand(-1500, 1500)) . '")</script>';
                        }
                        ${$customx_advertisement} .= '</div>';
                        // This is a weak fix to the escaped single quotes and damaging double quotes and I don't like it.
                        ${$customx_advertisement} = str_replace($str_find, $str_replace, ${$customx_advertisement});
                        insertads($vbulletin->options["{$adintegrate_customx_autoinsert}"], $adintegrate_customx_template, ${$customx_advertisement});
                    }
                }
                $i++;
            }
            unset($i);
        }
    }
}
Example #2
0
     if (move_uploaded_file($_FILES['img2']['tmp_name'], $target)) {
         $s6 = 1;
     } else {
         error('Error Uploading Image 3 !!');
         $s6 = 0;
     }
 } else {
     $img2 = kbase() . '/kart/nimg.jpg';
     $s5 = 1;
     $s6 = 1;
 }
 //**************************************************************************************************************************************
 $error = 1;
 if ($s1 && $s2 && $s3 && $s4 && $s5 && $s6) {
     $error = 0;
     $arr = createad($title, $section, $category, $age, $sp, $info, $mimg, $img1, $img2, $group, $contact, $email, $warranty, $pn, $date, $timg);
     $arr = explode(":", $arr);
     $article_id = $arr[0];
     $uniq_id = $arr[1];
     $body = "<html><p>Hi ,</p>\n\t\t<p>You've just posted an ad on YourKart.com . If you need to find your ad, you can find it at the link below :</p>\n\t\t<p><a href=" . '"' . "http://www.yourkart.com/index.php?option=com_content&view=article&id={$article_id}" . '"' . ">{$title}</a></p>\n\t\t<p>To edit your Ad, use the link below :</p>\n\t\t<p><a href=" . '"' . "http://www.yourkart.com/index.php?option=com_content&view=article&id=56&token={$uniq_id}" . '"' . ">Click Here to Edit Your Ad</a></p>\n\t\t<p></p><p>When you have sold your item, you can delete the ad using the link below :</p>\n\t\t<p><a href=" . '"' . "http://www.yourkart.com/index.php?option=com_content&view=article&id=57&token={$uniq_id}" . '"' . ">Click Here to Delete Your Ad</a></p>\n\t\t<p></p><p>We wish you good luck in finding the seller for your item. We are happy to be of any help in this procedure.</p>\n\t\t<p>Regards</p>\n\t\t<p>YourKart Team</p></html>";
     $to = $email;
     $sub = "You just posted an Ad on YourKart.com";
     $headers = 'MIME-Version: 1.0' . "\r\n";
     $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
     $headers .= 'From: YourKart <*****@*****.**>' . "\r\n";
     mail($to, $sub, $body, $headers);
     $msg = '<a href="http://www.yourkart.com/index.php?option=com_content&view=article&id=' . $article_id . '" target="_parent">Click here to view your Ad</a></br> <b>Spread the word !! Share your Ad on Facebook</b> </br> <fb:like href="http://www.yourkart.com/index.php?option=com_content&view=article&id=' . $article_id . '" send="true" layout="button_count" width="450" show_faces="false" font="arial"></fb:like>';
     info($msg);
     check_requests($title, $article_id, $group, $section, $category);
 } else {
     error('Sorry, Something went wrong. Please try again !!');
Example #3
0
 print_table_start();
 print_table_header($vbphrase['setting_adintegrate_custom'] . ' ' . $i);
 print_description_row($adintegrate_onoff_warning . construct_phrase($vbphrase['setting_adintegrate_x_onoff_title'], strtolower($vbphrase['setting_adintegrate_custom'] . ' ' . $i)), 0, 99, 'optiontitle', 'left');
 print_yes_no_row('<span class="smallfont">' . construct_phrase($vbphrase['setting_adintegrate_x_onoff_desc'], strtolower($vbphrase['setting_adintegrate_custom'] . ' ' . $i)) . '</span>', 'setting[adintegrate_' . $customx . '_onoff]', $vbulletin->options["{$adintegrate_customx_onoff}"]);
 $j++;
 print_description_row($adintegrate_refresh_onoff_warning . construct_phrase($vbphrase['setting_adintegrate_x_refresh_title'], $vbphrase['setting_adintegrate_custom'] . ' ' . $i), 0, 99, 'optiontitle', 'left');
 print_select_row('<span class="smallfont">' . construct_phrase($vbphrase['setting_adintegrate_x_refresh_desc'], strtolower($vbphrase['setting_adintegrate_custom'] . ' ' . $i)) . '</span>', 'setting[adintegrate_' . $customx . '_refresh]', array('0' => $vbphrase['setting_adintegrate_disabled'], '10' => '10', '15' => '15', '20' => '20', '25' => '25', '30' => '30', '35' => '35', '40' => '40', '45' => '45', '50' => '50', '55' => '55', '60' => '60 ' . construct_phrase($vbphrase['setting_adintegrate_x_minutes'], '1')), $vbulletin->options["{$adintegrate_customx_refresh}"], 0, 1);
 $j++;
 print_description_row(construct_phrase($vbphrase['setting_adintegrate_x_timescale_title'], $vbphrase['setting_adintegrate_custom'] . ' ' . $i), 0, 99, 'optiontitle', 'left');
 print_input_row('<span class="smallfont">' . construct_phrase($vbphrase['setting_adintegrate_x_timescale_desc'], $vbphrase['setting_adintegrate_custom'] . ' ' . $i) . '<br /><br /><span class="col-i">' . $vbphrase['setting_adintegrate_examples'] . '<br />' . construct_phrase($vbphrase['setting_adintegrate_x_timescale_demo'], $addelimiter) . '</span><br /><br /><span class="col-g" style="font-style:italic;">' . construct_phrase($vbphrase['setting_adintegrate_x_timescale_note']) . '</span></span>', 'setting[adintegrate_' . $customx . '_timescale]', $vbulletin->options["{$adintegrate_customx_timescale}"], 0, 40);
 $j++;
 print_description_row(construct_phrase($vbphrase['setting_adintegrate_createad_title'], $vbphrase['setting_adintegrate_custom'] . ' ' . $i), 0, 99, 'optiontitle', 'left');
 print_textarea_row('<span class="smallfont">' . construct_phrase($vbphrase['setting_adintegrate_createad_desc'], $addelimiter) . '<br /><br /><span class="col-g" style="font-style:italic;">' . construct_phrase($vbphrase['setting_adintegrate_createad_note']) . '</span><br /><br /><input type="button" value="' . $vbphrase['setting_adintegrate_update_preview'] . '" onclick="' . $customx . '_adcode_previewing(fetch_object(\'ta_setting[adintegrate_' . $customx . '_adcode]_' . $j . '\').value); return false;" /> <span id="' . $customx . '_preview_working"></span>', 'setting[adintegrate_' . $customx . '_adcode]', $vbulletin->options["{$adintegrate_customx_adcode}"], 10, 50, 0, 1);
 print_description_row($vbphrase['setting_adintegrate_adcode_preview'], 0, 99, 'optiontitle', 'center');
 if (!empty($vbulletin->options["{$adintegrate_customx_adcode}"])) {
     $adcode = createad($vbulletin->options["{$adintegrate_customx_adcode}"]);
 } else {
     $adcode = $vbphrase['setting_adintegrate_nothing_to_display'];
 }
 print_description_row('<span id="' . $customx . '_adcode_contents">' . $adcode . '</span>', 0, 99, 'alt1', 'center');
 $j++;
 print_description_row(construct_phrase($vbphrase['setting_adintegrate_x_autoinsert_template_title'], $vbphrase['setting_adintegrate_custom'] . ' ' . $i), 0, 99, 'optiontitle', 'left');
 print_select_row('<span class="smallfont">' . construct_phrase($vbphrase['setting_adintegrate_x_autoinsert_template_desc'], strtolower($vbphrase['setting_adintegrate_custom'] . ' ' . $i)) . '</span>', 'setting[' . $adintegrate_customx_template . ']', $template_array, $vbulletin->options["{$adintegrate_customx_template}"], 0, 1);
 $j++;
 print_description_row($adintegrate_autoinsert_warning . construct_phrase($vbphrase['setting_adintegrate_x_autoinsert_title'], $vbphrase['setting_adintegrate_custom'] . ' ' . $i), 0, 99, 'optiontitle', 'left');
 print_textarea_row('<span class="smallfont">' . construct_phrase($vbphrase['setting_adintegrate_x_autoinsert_desc'], strtolower($vbphrase['setting_adintegrate_custom'] . '_' . $i)) . '<br /><br /><span class="col-i">' . $vbphrase['setting_adintegrate_examples'] . '<br />' . construct_phrase($vbphrase['setting_adintegrate_x_autoinsert_demo'], strtolower($vbphrase['setting_adintegrate_custom'] . $i)) . '</span></span>', 'setting[adintegrate_' . $customx . '_autoinsert]', $vbulletin->options["{$adintegrate_customx_autoinsert}"], 5, 33, 0, 0);
 $j++;
 print_submit_row();
 echo '<br />';
 print_table_start();
 $i++;