예제 #1
0
}
if (isset($_POST['name'])) {
    //**************************Image**********************
    $target = "groupimage/";
    if (basename($_FILES['mimg']['name'])) {
        $name = basename($_FILES['mimg']['name']);
        $res = checkex($name);
        $s1 = 1;
        if (!$res) {
            error('File Type not allowed!! You can only upload JPEG,PNG,BMP and GIF images.');
            $s1 = 0;
        } else {
            $name = str_replace(' ', '_', $name);
            $name = get_rand_id(15) . '_' . $name;
            $target = $target . $name;
            $mimg = kbase() . '/kart/' . $target;
            if (move_uploaded_file($_FILES['mimg']['tmp_name'], $target)) {
                $s2 = 1;
            } else {
                error('Error Uploading Main Image !!');
                $s2 = 0;
            }
        }
    }
    if ($s1 && $s2) {
        //$desc=strip_tags($_POST['desc']);
        $q = "INSERT INTO `groups` (`id`, `name`, `members`, `pic`, `alias`) VALUES (NULL, '{$title}', '0', '{$name}', '{$alias}')";
        //echo $q;
        mysql_query($q) or die('Could not create group|| My SQL Error !!');
        echo '<font color="#006600">Group Created Successfully !!</font>';
    } else {
예제 #2
0
파일: editad.php 프로젝트: karunakarg/ykweb
}
?>
>Yes</option>
          <option value="no" <?php 
if ($warranty == 'no') {
    echo 'selected="selected"';
}
?>
>No</option>
          </select>
      </label></td>
    </tr>
    <tr>
      <td colspan="2">Visibility</td>
<td colspan="2"><a href="<?php 
echo kbase();
?>
/index.php?option=com_content&view=article&id=30&gid=<?php 
echo $grp['id'];
?>
" target="_blank"><?php 
echo $grp['name'];
?>
</a></td>
    </tr>
    <tr>
      <td colspan="2">Additional  Information</td>
      <td colspan="2"><textarea name="info" id="textarea" cols="30" rows="3" tooltipText="You can tell your buyers more about the item 
     for e.g. its condition,color,accessories,
      features etc."><?php 
echo $info;
예제 #3
0
function checkact($id)
{
    $uzere = getuser($id);
    if (!$uzere['active']) {
        error('Please Complete your profile first !!');
        message(' ');
        echo '<a href="' . kbase() . '/index.php?option=com_wrapper&view=wrapper&Itemid=85" target="_parent">Click here to complete it now !!</a>';
        die;
    }
}
예제 #4
0
         error('Error Uploading Image 3 :');
         error('File Type not allowed!! You can only upload JPEG,PNG,BMP and GIF images.');
         $s5 = 0;
     }
     $name = str_replace(' ', '_', $name);
     $name = get_rand_id(15) . '_' . $name;
     $target = $target . $name;
     $img2 = kbase() . '/kart/' . $target;
     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";
예제 #5
0
<?php

include 'sqlcon.php';
include 'kartlib.php';
$base = $_POST['base'];
if (isset($base)) {
    $q = "UPDATE `settings` SET `value` = '{$base}' WHERE `name` ='sitename'";
    mysql_query($q) or die('MySQL Error(1)!!');
    echo '<script type="text/javascript"> alert("Saved Successfully !!"); </script>';
}
$base = kbase();
?>
<form id="form1" name="form1" method="post" action="settings.php">
  <table width="500" border="0" cellspacing="0">
    <tr>
      <td width="96">Base URL :</td>
      <td width="400"><input name="base" type="text" id="textfield" value="<?php 
echo $base;
?>
" size="40" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="button" id="button" value="SAVE" /></td>
    </tr>
  </table>
</form>