Пример #1
0
    }
}
if ($_POST[create_tag] || $_POST[edit_tag]) {
    $name = mysql_real_escape_string($_POST[tag_name]);
    $url = mysql_real_escape_string($_POST[tag_url]);
    $size = mysql_real_escape_string($_POST[size]);
    $sizes = new class_sizes($size);
    if ($name && $url && $size) {
        if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
            echo language('ERROR_url');
            exit;
        }
        $parse = parse_url($url);
        $url = $parse['host'];
        if ($_POST[create_tag]) {
            class_tags::add($logged->get_unique(), $name, $url, 'all', $sizes->get_size(), $tag_cost);
            echo language('SUCCESS_tag_created');
        }
        if ($_POST[edit_tag]) {
            $tag = new class_tags($_POST[unique]);
            $tag->set_name($name);
            $tag->set_website($url);
            $tag->set_ad_type($sizes->get_size());
            echo language('SUCCESS_tag_modified');
        }
    } else {
        echo language('COMMON_ERROR_fields');
    }
}
//Create Campaign Banner
if ($_POST[create_campaign_banner] || $_POST[edit_campaign_banner]) {
Пример #2
0
$count = 0;
while ($categories = mysql_fetch_array($result)) {
    $size = new class_sizes($categories[unique]);
    ?>
        <div class="box list" id="<?php 
    echo $size->get_unique();
    ?>
">
          <table width="100%" border="0">
            <tr>
              <td width="24%"><strong>#<?php 
    echo $size->get_unique();
    ?>
</strong></td>
              <td width="67%"><?php 
    echo $size->get_size();
    ?>
</td>
              <td width="9%"><a href="javascript:delete_size('<?php 
    echo $size->get_unique();
    ?>
')"><img src="app_images/icon-delete.png" width="24" class="tip" title="<?php 
    echo language('ICON_size_delete');
    ?>
"  /></a></td>
            </tr>
          </table>
        </div>
        <?php 
}
?>