How to answer multiple queries efficiently?
When the value of $t_1$ is not present you are just given weighted intervals from left to right with weight value, and you should ask questions of the form, what is the sum of the weights of intervals that contains x. 

If we know all intervals/weights before hand this whole task is easy without any fancy data structure, just adding the beginning of the interval with weight +value and the end with weight -value and accumulate all such values. The answer will be constant in intervals and to find the value at $x$ you can binary search for the interval that contains $x$. Will not go deep into this solution since it will not allow us to solve the problem when $t_1$ constraint is used again.

Assume we don't know all intervals before hand and we have a mix in of, add new interval, find sum of all intervals containing $x$. You can solve this problem using segment tree with lazy propagation to add a value on intervals fast, and query sum on points (actually with segment tree you can query in intervals but it isn't required here). Both queries are done in $O(log N)$ where $N$ is the number of intervals.

Let's call all given intervals in the input updates. To solve the problem with $t_1$ back, sort all queries and updates by $t$ value. And process them in such order. When you are processing each query of type $(x, t_1)$ only intervals with lower $t$ are present in the data structure, so we have an instance of the previous problem, ask for all intervals containing $x$, whenever you get an update, add it to the data structure.

This solution is offline, since you require to know all queries beforehand. This can be solved online using persistent segment trees. The overall complexity of the solution described here is $O((N+Q) log N)$.