4
Contributors
18
Replies
26
Views
5 Years
Discussion Span
Last Post by chandni2014
0

@godslove

Can you post the code that is not working so I can understand what you are talking about. It's hard to help you if I can't see the issue that you are having.

0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
    <title>  Posh and Glam Calendar </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/dailog.css" rel="stylesheet" type="text/css" />
    <link href="css/calendar.css" rel="stylesheet" type="text/css" /> 
    <link href="css/dp.css" rel="stylesheet" type="text/css" />   
    <link href="css/alert.css" rel="stylesheet" type="text/css" /> 
    <link href="css/main.css" rel="stylesheet" type="text/css" /> 
        <link rel="stylesheet" href="home.css"type="text/css" media="all" />


    <script src="src/jquery.js" type="text/javascript"></script>  

    <script src="src/Plugins/Common.js" type="text/javascript"></script>    
    <script src="src/Plugins/datepicker_lang_US.js" type="text/javascript"></script>     
    <script src="src/Plugins/jquery.datepicker.js" type="text/javascript"></script>

    <script src="src/Plugins/jquery.alert.js" type="text/javascript"></script>    
    <script src="src/Plugins/jquery.ifrmdailog.js" defer="defer" type="text/javascript"></script>
    <script src="src/Plugins/wdCalendar_lang_US.js" type="text/javascript"></script>    
    <script src="src/Plugins/jquery.calendar.js" type="text/javascript"></script>   

    <script type="text/javascript">
        $(document).ready(function() {     
           var view="week";          

            var DATA_FEED_URL = "php/datafeed.php";
            var op = {
                view: view,
                theme:3,
                showday: new Date(),
                EditCmdhandler:Edit,
                DeleteCmdhandler:Delete,
                ViewCmdhandler:View,    
                onWeekOrMonthToDay:wtd,
                onBeforeRequestData: cal_beforerequest,
                onAfterRequestData: cal_afterrequest,
                onRequestDataError: cal_onerror, 
                autoload:true,
                url: DATA_FEED_URL + "?method=list",  
                quickAddUrl: DATA_FEED_URL + "?method=add", 
                quickUpdateUrl: DATA_FEED_URL + "?method=update",
                quickDeleteUrl: DATA_FEED_URL + "?method=remove"        
            };
            var $dv = $("#calhead");
            var _MH = document.documentElement.clientHeight;
            var dvH = $dv.height() + 2;
            op.height = _MH - dvH;
            op.eventItems =[];

            var p = $("#gridcontainer").bcalendar(op).BcalGetOp();
            if (p && p.datestrshow) {
                $("#txtdatetimeshow").text(p.datestrshow);
            }
            $("#caltoolbar").noSelect();

            $("#hdtxtshow").datepicker({ picker: "#txtdatetimeshow", showtarget: $("#txtdatetimeshow"),
            onReturn:function(r){                          
                            var p = $("#gridcontainer").gotoDate(r).BcalGetOp();
                            if (p && p.datestrshow) {
                                $("#txtdatetimeshow").text(p.datestrshow);
                            }
                     } 
            });
            function cal_beforerequest(type)
            {
                var t="Loading data...";
                switch(type)
                {
                    case 1:
                        t="Loading data...";
                        break;
                    case 2:                      
                    case 3:  
                    case 4:    
                        t="The request is being processed ...";                                   
                        break;
                }
                $("#errorpannel").hide();
                $("#loadingpannel").html(t).show();    
            }
            function cal_afterrequest(type)
            {
                switch(type)
                {
                    case 1:
                        $("#loadingpannel").hide();
                        break;
                    case 2:
                    case 3:
                    case 4:
                        $("#loadingpannel").html("Success!");
                        window.setTimeout(function(){ $("#loadingpannel").hide();},2000);
                    break;
                }              

            }
            function cal_onerror(type,data)
            {
                $("#errorpannel").show();
            }
            function Edit(data)
            {
               var eurl="edit.php?id={0}&start={2}&end={3}&isallday={4}&title={1}";   
                if(data)
                {
                    var url = StrFormat(eurl,data);
                    OpenModelWindow(url,{ width: 600, height: 400, caption:"Manage  The Calendar",onclose:function(){
                       $("#gridcontainer").reload();
                    }});
                }
            }    
            function View(data)
            {
                var str = "";
                $.each(data, function(i, item){
                    str += "[" + i + "]: " + item + "\n";
                });
                alert(str);               
            }    
            function Delete(data,callback)
            {           

                $.alerts.okButton="Ok";  
                $.alerts.cancelButton="Cancel";  
                hiConfirm("Are You Sure to Delete this Event", 'Confirm',function(r){ r && callback(0);});           
            }
            function wtd(p)
            {
               if (p && p.datestrshow) {
                    $("#txtdatetimeshow").text(p.datestrshow);
                }
                $("#caltoolbar div.fcurrent").each(function() {
                    $(this).removeClass("fcurrent");
                })
                $("#showdaybtn").addClass("fcurrent");
            }
            //to show day view
            $("#showdaybtn").click(function(e) {
                //document.location.href="#day";
                $("#caltoolbar div.fcurrent").each(function() {
                    $(this).removeClass("fcurrent");
                })
                $(this).addClass("fcurrent");
                var p = $("#gridcontainer").swtichView("day").BcalGetOp();
                if (p && p.datestrshow) {
                    $("#txtdatetimeshow").text(p.datestrshow);
                }
            });
            //to show week view
            $("#showweekbtn").click(function(e) {
                //document.location.href="#week";
                $("#caltoolbar div.fcurrent").each(function() {
                    $(this).removeClass("fcurrent");
                })
                $(this).addClass("fcurrent");
                var p = $("#gridcontainer").swtichView("week").BcalGetOp();
                if (p && p.datestrshow) {
                    $("#txtdatetimeshow").text(p.datestrshow);
                }

            });
            //to show month view
            $("#showmonthbtn").click(function(e) {
                //document.location.href="#month";
                $("#caltoolbar div.fcurrent").each(function() {
                    $(this).removeClass("fcurrent");
                })
                $(this).addClass("fcurrent");
                var p = $("#gridcontainer").swtichView("month").BcalGetOp();
                if (p && p.datestrshow) {
                    $("#txtdatetimeshow").text(p.datestrshow);
                }
            });

            $("#showreflashbtn").click(function(e){
                $("#gridcontainer").reload();
            });

            //Add a new event
            $("#faddbtn").click(function(e) {
                var url ="edit.php";
                OpenModelWindow(url,{ width: 500, height: 400, caption: "Create New Calendar"});
            });
            //go to today
            $("#showtodaybtn").click(function(e) {
                var p = $("#gridcontainer").gotoDate().BcalGetOp();
                if (p && p.datestrshow) {
                    $("#txtdatetimeshow").text(p.datestrshow);
                }


            });
            //previous date range
            $("#sfprevbtn").click(function(e) {
                var p = $("#gridcontainer").previousRange().BcalGetOp();
                if (p && p.datestrshow) {
                    $("#txtdatetimeshow").text(p.datestrshow);
                }

            });
            //next date range
            $("#sfnextbtn").click(function(e) {
                var p = $("#gridcontainer").nextRange().BcalGetOp();
                if (p && p.datestrshow) {
                    $("#txtdatetimeshow").text(p.datestrshow);
                }
            });

        });
    </script>    
<style type="text/css">
body {
    background-color: #000;
}
</style>
</head>
<body>


    <div>


<table width="100%">
  <tr>
    <td width="565" height="60" align="center" valign="bottom"><a href="admin.php"><font face="Arial Narrow" color="#FFFFFF">&nbsp;&nbsp;<b>Posh and Glam Calendar</b></font></a>
      <div class="right">
                    <p>
                        Welcome <a href="#"><strong>Administrator</strong></a>  
                        |

                      <a href="logout.php">Logout </a>&nbsp;&nbsp;&nbsp;&nbsp;
                    </p>
                </div> </td>
  </tr>
  <tr>
    <td height="35" valign="bottom" bgcolor="#FF0080">&nbsp;&nbsp;&nbsp;&nbsp;<a href="sample.php"><font face="Arial Narrow" color="#FFFFFF">☁<b> Calendar</b></font></a></td>
  </tr>
  <tr>
    <td height="35" valign="bottom" bgcolor="#6D0783">&nbsp;&nbsp;&nbsp;&nbsp;<a href="admin.php"><font face="Arial Narrow" color="#FFFFFF">♥  <b>  Products</b></font></a></td>
  </tr>
  </table>

      <div id="calhead" style="padding-left:1px;padding-right:1px;">          
            <div class="cHead">
              <div class="ftitle">
                <table width="200" border="0">
                  <tr>
                    <td>&nbsp;</td>
                  </tr>
                </table>
              </div>
            <div id="loadingpannel" class="ptogtitle loadicon" style="display: none;">Loading data...</div>
             <div id="errorpannel" class="ptogtitle loaderror" style="display: none;">Sorry, could not load your data, please try again later</div>
        </div>          

            <div id="caltoolbar" class="ctoolbar">
              <div id="faddbtn" class="fbutton">
                <div><span title='Click to Create New Event' class="addcal">

                New Event                
                </span></div>
            </div>
            <div class="btnseparator"></div>
             <div id="showtodaybtn" class="fbutton"></div>
              <div class="btnseparator"></div>

            <div id="showdaybtn" class="fbutton">
                <div><span title='Day' class="showdayview">Day</span></div>
            </div>
              <div  id="showweekbtn" class="fbutton fcurrent ">
                <div><span title='Week' class="showweekview">Week</span></div>
            </div>
              <div  id="showmonthbtn" class="fbutton ">
                <div><span title='Month' class="showmonthview">Month</span></div>

            </div>
            <div class="btnseparator"></div>
              <div  id="showreflashbtn" class="fbutton">
                <div><span title='Refresh view' class="showdayflash">Refresh</span></div>
              </div>
             <div class="btnseparator"></div>
            <div id="sfprevbtn" title="Prev"  class="fbutton">
              <span class="fprev"></span>

            </div>
            <div id="sfnextbtn" title="Next" class="fbutton">
                <span class="fnext"></span>
            </div>
            <div class="fshowdatep fbutton">
                    <div>
                        <input type="hidden" name="txtshow" id="hdtxtshow" />
                        <span id="txtdatetimeshow">Loading</span>

                    </div>
            </div>

            <div class="clear"></div>
            </div>
      </div>
      <div style="padding:1px;">

        <div class="t1 chromeColor">
            &nbsp;</div>
        <div class="t2 chromeColor">
            &nbsp;</div>
        <div id="dvCalMain" class="calmain printborder">
            <div id="gridcontainer" style="overflow-y: visible;">
            </div>
        </div>
        <div class="t2 chromeColor">

            &nbsp;</div>
        <div class="t1 chromeColor">
            &nbsp;
        </div>   
      </div>

</div>
</body>
</html>
0

@godslove

Did you installed it correctly?

I just install it on my godaddy account and it works fine.

Did you open the sample.php on your local server?

I think it has to do with your mysql connection.

I mean you have to create database first and then upload sql file.

This file dbconfig.php is in the php folder which you need to enter your db.

I can't help you with that one, you have to connect the file to your db

0

when i run it in localhost it runs correctly but when the time i put it on a web hosting, it doesnt run

0

@godslove

when i run it in localhost it runs correctly but when the time i put it on a web hosting, it doesnt run

This file dbconfig.php is in the php folder which you need to enter your db info.

Did you open this file sample.php on your local server?

I open it in EasyPHP & XAMPP & Godaddy .

I don't know what else to tell you.

Open your browser and run the dbconfig.php and tell me what message you get?

dbconfig.php

<?php
class DBConnection{
    function getConnection(){

      //change to your database server/user name/password
        mysql_connect("localhost","root","") or
         die("Could not connect: " . mysql_error());

      //change to your database name
        mysql_select_db("jqcalendar") or 
             die("Could not select database: " . mysql_error());
    }
 }
 ?>
0

in localhost it running but when i transfer it to my web hosting ipage.com , it says, sorry ,cannot load.please try again later , but i already change the host,username and pass correctly

0

@godslove

hello ,i run it : it just a blank page

It means that it's connected.

it says, sorry ,cannot load.please try again later

I'm trying to figure out why you are not loading the page. It's loading on mines.

This is how I did it:

OK, On the script there's a file called "jquery.js". Which looks like this:

<script src="src/jquery.js" type="text/javascript"></script>

Replace it with this:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

Also in the folder wDCalendar

Rename edit.db.php to edit.php,

In the php folder rename datafeed.db.php to datafeed.php

The reason is because it has the mysql query plus db function.

After that run it again. Let know me the results.

Edited by LastMitch: g

0

@godslove

OK, you gotta me bit frustrated but I'll help you figure this out. I feel right now it's still the related to the database.

Did you fill this out correctly:

$server = "localhost";
$username = "root";
$password = "your password";
$database = "your db";

-

mysql_connect("localhost","root","","") or die("Could not connect: " . mysql_error());

Can you check rather these files are connected?

These 2 files:

Rename edit.db.php to edit.php,

In the php folder rename datafeed.db.php to datafeed.php

I want you to test out the rename files which is the bold ones.

I want to know whether this file dbconfig.php is connected to edit.php & datafeed.php ?

0

Silly question but does the DB jqcalendar exist on your hosting site?

Did you install, or FTP and import the DB tables?

I would suggest you run it through from the begining

0

@Squidge

That is a good question! I missed that. I left out that info.

Edited by LastMitch: g

0

@godslove

does the DB jqcalendar exist on your hosting site?

Squidge make a good point, did you created a "DB" for jqcalendar on your hosting site?

That sql.file only create the table, you have to create a "DB" for jqcalendar.

0

yes i have already created all what you have said

0

that's why im confuse why it is not running

0

that's why im confuse why it is not running

The only thing i can think of is actually running the install on your webhost

0

@godslove

Can you download a new copy and we go from there. Don't used this copy at all. Download a new copy.

On this file enter db.

dbconfig.php

<?php
class DBConnection{
function getConnection(){
//change to your database server/user name/password
mysql_connect("localhost","root","") or
die("Could not connect: " . mysql_error());
//change to your database name
mysql_select_db("jqcalendar") or
die("Could not select database: " . mysql_error());
}
}
?>

-

$server = "localhost";
$username = "root";
$password = "your password";
$database = "your db";

Now sign in to your Database.

Create Database : jqcalendar

Now go to the INSERT and upload the setup.sql it will create the jqcalendar table.

Now zip the new copy and upload to your host server.

Tell me what you got. The reason why I'm asking you to do this because it will give me a picture on how you installed the file. So I can fixed the issue and you can used the calender.

0

hello, i am having the same issue, i am not able to load data in wdcalendar. i have read the conversation, this wdcalendar is working fine in localhost but not working in the server. Please help me out....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.