Ejemplo n.º 1
0
            break;
    }
    $email = '<!DOCTYPE html ><html><body><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><center><table id="wrapper" width="600" cellspacing="0" cellpadding="0" border="0" ><tr><td style="padding:0px;border-collapse:collapse;font-family:Arial, Helvetica, sans-serif;text-align: center"><img style="border:0;height:auto;line-height:100%;outline:none;text-decoration:none;float:left;" width="600" height="67" src="http://comunidad.nitragin.com.ar/mailing/notif/img/header.png"/></a></td></tr><tr><td style="border-collapse:collapse;padding-right:31px;font-family:Helvetica, sans-serif;padding-top:25px;"><table style="margin:0;"><tr><td style="padding:0;padding-left:150px;border-collapse:collapse;font-family:Arial, Helvetica, sans-serif;text-align: center;padding-top:20px;" ><img width="44" height="44" src="http://comunidad.nitragin.com.ar/mailing/notif/img/msg.png"/ style="float:right;border:0;height:auto;line-height:100%;outline:none;text-decoration:none;"><br></td><td style="padding:0;border-collapse:collapse;font-family:Arial, Helvetica, sans-serif;text-align: center;padding-top:10px;"><p style="font-family:Helvetica, sans-serif;float:left;font-size:15px;color:#66686A;margin:0;mso-line-height-rule:exactly;line-height:13px;text-align: left;">Has recibido un nuevo mensaje de<br>' . $from . '</p></td></tr></table></td></tr><tr><td style="border-collapse:collapse;font-family:Helvetica, sans-serif;text-align:center;padding-bottom:40px;"><table style="margin:0;"><tr><td style="padding:0;border-collapse:collapse;font-family:Arial, Helvetica, sans-serif;text-align: center;padding-left:240px;" ><a href="' . $link . '"><img src="http://comunidad.nitragin.com.ar/mailing/notif/img/more.png" width="53" height="20"></a></td></tr></table></td></tr><tr><td style="border-collapse:collapse;font-family:Helvetica, sans-serif;text-align:center;background-color:#3F2B3C"><table style="margin:0;"><tr><td style="padding:7px 0px;padding-left:20px;border-collapse:collapse;font-family:Arial, Helvetica, sans-serif;text-align: left;" ><img width="139" height="20" src="http://comunidad.nitragin.com.ar/mailing/notif/img/commL.png"/ style="float:right;border:0;height:auto;line-height:100%;outline:none;text-decoration:none;"><br></td></tr></table></td></tr></table></center><style type="text/css">table{font-family:Arial, Helvetica, sans-serif;border:0;}p{text-align:justify;}</style><style type="text/css">/* Client-specific Styles */#outlook a{padding:0;}/* Force Outlook to provide a "view in browser" button. */body{width:100% !important;}.ReadMsgBody{width:100%;}.ExternalClass{width:100%;}/* Force Hotmail to display emails at full width */body{-webkit-text-size-adjust:none;}/* Prevent Webkit platforms from changing default text sizes. *//* Reset Styles */body{margin:0px auto;padding:0;font-family:Arial, Helvetica, sans-serif;}img{border:0;height:auto;line-height:100%;outline:none;text-decoration:none;float:left;}</style></body></html>';
    $subject = "Nueva notificacion en Nitragin Comunidad";
    $fromM = "*****@*****.**";
    $headers = "From:" . $fromM . "\r\n";
    $headers .= "Reply-To:soporte@nitragin.com.ar\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
    mail($to['user'], $subject, $email, $headers);
}
$username = "******";
$password = "******";
$hostname = "localhost";
$db = "comm";
$title = $_POST['tit'];
$desc = $_POST['text'];
if ($_POST['tit'] != "" && $_POST['text'] != "") {
    $db = new mysqli($hostname, $username, $password, $db);
    $db->set_charset("utf8");
    mb_internal_encoding('UTF-8');
    if ($db->connect_errno > 0) {
        die('Unable to connect to database [' . $db->connect_error . ']');
    }
    if ($db->query("INSERT INTO tblnews (header,text,fromId,toId) VALUES ('" . $title . "','" . $desc . "','" . $_SESSION['userId'] . "','," . implode(",", $_POST['msgSel']) . ",')")) {
        echo 1;
        $id = $db->insert_id;
        sendMsgNotif($_SESSION['userId'], $_POST['msgSel'], $id, $title);
        addCategories($_POST['msgCatSel'], $id);
    }
}
Ejemplo n.º 2
0
$hostname = "localhost";
$db = "comm";
$id = $_POST['postId'];
if ($_POST['postId'] != "") {
    $db = new mysqli($hostname, $username, $password, $db);
    $db->set_charset("utf8");
    mb_internal_encoding('UTF-8');
    if ($db->connect_errno > 0) {
        die('Unable to connect to database [' . $db->connect_error . ']');
    }
    if ($row = $db->query("SELECT * FROM tblimgs WHERE imgId=" . $id . "")->fetch_array()) {
        $query = "INSERT INTO tblimgs (path,head,text,fromId,toId,total,shareable) VALUES ('" . $row['path'] . "','" . $row['head'] . "','" . $row['text'] . "'," . $_SESSION['userId'] . ",'," . implode(",", $_POST['shareSel']) . ",','" . $row['total'] . "',1)";
        if ($db->query("INSERT INTO tblimgs (path,head,text,fromId,toId,total,shareable,shared,sharedFrom) VALUES ('" . $row['path'] . "','" . $row['head'] . "','" . $row['text'] . "'," . $_SESSION['userId'] . ",'," . implode(",", $_POST['shareSel']) . ",','" . $row['total'] . "',1,1," . $id . ")")) {
            $id = $db->insert_id;
            $genPath = "uploads/imgs/" . $id;
            mkdir($genPath, 0777);
            $path = "uploads/imgs/" . $id . "/crop_S.jpg";
            $oldPath = "uploads/imgs/" . $_POST['postId'] . "/crop_S.jpg";
            if (copy($oldPath, $path)) {
                $ok = 1;
            } else {
                $ok = 0;
            }
            echo $ok;
            sendMsgNotif($_SESSION['userId'], $_POST['shareSel'], $id);
            addCategories($_POST['postId'], $id);
        } else {
            echo $query;
        }
    }
}
Ejemplo n.º 3
0
                                <label for="cat_title">Add Categories</label>
                                <input type="text" class="form-control" id="cat_title" name="cat_title">
                            </div>
                            <button type="submit" class="btn btn-success" name="submit">Add</button>
                        </form>

                        <br>
                        <?php 
/*grabs cat id for 'edit click*/
if (isset($_GET['edit'])) {
    $cat_id = $_GET['edit'];
    include "includes/update_categories.php";
}
?>
                        <?php 
addCategories();
?>


                    </div>
                    <div class="col-xs-6">
                        <table class="table table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th>id</th>
                                    <th>category title</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php 
displayCategories();
Ejemplo n.º 4
0
$username = "******";
$password = "******";
$hostname = "localhost";
$db = "comm";
$ok = 0;
$title = $_POST['tit'];
$desc = $_POST['text'];
if ($_FILES['fileUp']['error'][0] != 4 && $_POST['tit'] != "") {
    $db = new mysqli($hostname, $username, $password, $db);
    $db->set_charset("utf8");
    if ($db->connect_errno > 0) {
        die('Unable to connect to database [' . $db->connect_error . ']');
    }
    if ($db->query("INSERT INTO tblfiles (path,head,text,fromId,toId) VALUES ('sdfds','" . $title . "','" . $desc . "','" . $_SESSION['userId'] . "','," . implode(",", $_POST['fileSel']) . ",')")) {
        $id = $db->insert_id;
        $genPath = "uploads/files/" . $id;
        mkdir($genPath, 0777);
        $ext = explode(".", $_FILES['fileUp']['name']);
        $path = "uploads/files/" . $db->insert_id . "/0." . $ext[count($ext) - 1];
        if (move_uploaded_file($_FILES['fileUp']['tmp_name'], $path)) {
            $ok++;
        } else {
            $ok = 0;
        }
        if ($db->query("UPDATE tblfiles SET path='" . $genPath . "/0." . $ext[count($ext) - 1] . "' WHERE fileId='" . $id . "'")) {
            echo $ok;
            sendFileNotif($_SESSION['userId'], $_POST['fileSel'], $id, $title);
            addCategories($_POST['fileCatSel'], $id);
        }
    }
}
Ejemplo n.º 5
0
 $title = Title::newFromText($name, NS_FILE);
 if ($title instanceof Title && $title->exists()) {
     $article = Article::newFromID($title->getArticleID());
     $oldContent = $article->getContent();
     // set default value
     $msg = array();
     $content = $oldContent;
     $status = Status::newGood();
     //remove category
     if (!empty($removeCategories)) {
         $content = removeCategories($content, $removeCategories);
         $msg[] = 'Removed: ' . implode(', ', $removeCategories);
     }
     // add category
     if (!empty($addCategories)) {
         $content = addCategories($content, $addCategories);
         $msg[] = 'Added: ' . implode(', ', $addCategories);
     }
     // edit page
     if (strcmp($oldContent, $content) !== 0) {
         if (!$dryRun) {
             $status = $article->doEdit($content, 'Changing categories', EDIT_UPDATE | EDIT_SUPPRESS_RC | EDIT_FORCE_BOT, false, $botUser);
         }
     } else {
         $noChanges++;
         $status = null;
         echo "...FAILED (no category changes).\n";
     }
     if ($status instanceof Status) {
         if ($status->isOK()) {
             $success++;